<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Archive::Zip - Provide an interface to ZIP archive files. - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Archive-Zip - MetaCPAN" href="https://metacpan.org/dist/Archive-Zip/releases.rss" />
        <link rel="canonical" href="./Archive::Zip.html" />
        <meta name="description" content="Provide an interface to ZIP archive files." />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Archive::Zip" />
<meta name="twitter:title"       content="Archive::Zip" />
<meta name="twitter:description" content="Provide an interface to ZIP archive files." />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Archive::Zip.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Archive-Zip was released.">
      <span class="relatize">12 Mar 2020 17:59:46 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Archive-Zip">Archive-Zip</a>
  </li>
  <li>
    Module version: 1.68
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Archive-Zip/source/lib/Archive/Zip.pm">Source</a>
    (<a href="https://metacpan.org/dist/Archive-Zip/source/lib/Archive/Zip.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Archive-Zip/source/lib/Archive">Browse</a>
    (<a href="https://metacpan.org/dist/Archive-Zip/source/lib/Archive?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Archive-Zip/changes">Changes</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Archive-Zip/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/redhotpenguin/perl-Archive-Zip">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/redhotpenguin/perl-Archive-Zip/issues">Issues</a>
      (25)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Archive-Zip+1.68" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/A/Archive-Zip.html?oncpan=1&amp;distmat=1&amp;version=1.68&amp;grade=2" style="color: #090">6689</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/A/Archive-Zip.html?oncpan=1&amp;distmat=1&amp;version=1.68&amp;grade=3" style="color: #900">177</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/A/Archive-Zip.html?oncpan=1&amp;distmat=1&amp;version=1.68&amp;grade=4">0</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/PHRED/Archive-Zip-1.68">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Archive-Zip who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 1
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/Archive-Zip-1.68/index.html">77.76% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li>
      Perl: v5.6.0
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Archive-Zip/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/P/PH/PHRED/Archive-Zip-1.68.tar.gz">
      Download (<span itemprop="fileSize">159.66KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FPHRED%2FArchive-Zip-1.68%2Flib%2FArchive%2FZip.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Archive-Zip/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Archive-Zip/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Archive-Zip">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Archive-Zip">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Archive/Zip.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="PHRED/Archive-Zip-1.68"
>1.68
  (PHRED on 2020-03-12)</option>
<option
  
  value="PHRED/Archive-Zip-1.67"
>1.67
  (PHRED on 2019-10-07)</option>
<option
  
  value="PHRED/Archive-Zip-1.66"
>1.66
  (PHRED on 2019-09-17)</option>
<option
  
  value="PHRED/Archive-Zip-1.65"
>1.65
  (PHRED on 2019-09-08)</option>
<option
  
  value="PHRED/Archive-Zip-1.64"
>1.64
  (PHRED on 2018-09-12)</option>
<option
  
  value="PHRED/Archive-Zip-1.63"
>1.63
  (PHRED on 2018-08-22)</option>
<option
  
  value="PHRED/Archive-Zip-1.62"
>1.62
  (PHRED on 2018-08-20)</option>
<option
  
  value="PHRED/Archive-Zip-1.61"
>1.61
  (PHRED on 2018-08-19)</option>
<option
  
  value="PHRED/Archive-Zip-1.60"
>1.60
  (PHRED on 2017-12-19)</option>
<option
  
  value="PHRED/Archive-Zip-1.59"
>1.59
  (PHRED on 2016-08-11)</option>
<option
  
  value="PHRED/Archive-Zip-1.58"
>1.58
  (PHRED on 2016-08-02)</option>
<option
  
  value="PHRED/Archive-Zip-1.57"
>1.57
  (PHRED on 2016-04-01)</option>
<option
  
  value="PHRED/Archive-Zip-1.56"
>1.56
  (PHRED on 2015-12-17)</option>
<option
  
  value="PHRED/Archive-Zip-1.55"
>1.55
  (PHRED on 2015-12-04)</option>
<option
  
  value="PHRED/Archive-Zip-1.53"
>1.53
  (PHRED on 2015-09-23)</option>
<option
  
  value="PHRED/Archive-Zip-1.51"
>1.51
  (PHRED on 2015-09-22)</option>
<option
  
  value="PHRED/Archive-Zip-1.50"
>1.50
  (PHRED on 2015-08-26)</option>
<option
  
  value="PHRED/Archive-Zip-1.49"
>1.49
  (PHRED on 2015-07-31)</option>
<option
  
  value="PHRED/Archive-Zip-1.48"
>1.48
  (PHRED on 2015-06-18)</option>
<option
  
  value="PHRED/Archive-Zip-1.47"
>1.47
  (PHRED on 2015-06-17)</option>
<option
  
  value="PHRED/Archive-Zip-1.46"
>1.46
  (PHRED on 2015-03-25)</option>
<option
  
  value="PHRED/Archive-Zip-1.45"
>1.45
  (PHRED on 2015-01-27)</option>
<option
  
  value="PHRED/Archive-Zip-1.44"
>1.44
  (PHRED on 2015-01-24)</option>
<option
  
  value="PHRED/Archive-Zip-1.43"
>1.43
  (PHRED on 2015-01-15)</option>
<option
  
  value="PHRED/Archive-Zip-1.42"
>1.42
  (PHRED on 2015-01-12)</option>
<option
  
  value="PHRED/Archive-Zip-1.41"
>1.41
  (PHRED on 2015-01-10)</option>
<option
  
  value="PHRED/Archive-Zip-1.40"
>1.40
  (PHRED on 2015-01-05)</option>
<option
  
  value="PHRED/Archive-Zip-1.39"
>1.39
  (PHRED on 2014-10-22)</option>
<option
  
  value="PHRED/Archive-Zip-1.38"
>1.38
  (PHRED on 2014-09-02)</option>
<option
  
  value="PHRED/Archive-Zip-1.37"
>1.37
  (PHRED on 2014-01-13)</option>
<option
  
  value="PHRED/Archive-Zip-1.36"
>1.36
  (PHRED on 2013-12-30)</option>
<option
  
  value="PHRED/Archive-Zip-1.35"
>1.35
  (PHRED on 2013-12-30)</option>
<option
  
  value="PHRED/Archive-Zip-1.34"
>1.34
  (PHRED on 2013-12-02)</option>
<option
  
  value="PHRED/Archive-Zip-1.33"
>1.33
  (PHRED on 2013-11-10)</option>
<option
  
  value="PHRED/Archive-Zip-1.32"
>1.32
  (PHRED on 2013-11-09)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_04"
>1.31_04 DEV
  (ADAMK on 2012-01-23)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_03"
>1.31_03 DEV
  (ADAMK on 2011-08-23)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_02"
>1.31_02 DEV
  (ADAMK on 2011-03-08)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_01"
>1.31_01 DEV
  (ADAMK on 2010-03-05)</option>
<option
  
  value="ADAMK/Archive-Zip-1.30"
>1.30
  (ADAMK on 2009-06-30)</option>
<option
  
  value="ADAMK/Archive-Zip-1.29"
>1.29
  (ADAMK on 2009-06-29)</option>
<option
  
  value="ADAMK/Archive-Zip-1.28"
>1.28
  (ADAMK on 2009-06-16)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.16"
>1.16
  (SMPETERS on 2005-07-04)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.15"
>1.15
  (SMPETERS on 2005-06-22)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.14"
>1.14
  (NEDKONZ on 2004-10-21)</option>
<optgroup label="BackPAN">'
<option
  
  value="ADAMK/Archive-Zip-1.27_01"
>1.27_01 DEV
  (ADAMK on 2008-12-16)</option>
<option
  
  value="ADAMK/Archive-Zip-1.26"
>1.26
  (ADAMK on 2008-10-12)</option>
<option
  
  value="ADAMK/Archive-Zip-1.25"
>1.25
  (ADAMK on 2008-10-10)</option>
<option
  
  value="ADAMK/Archive-Zip-1.24"
>1.24
  (ADAMK on 2008-08-23)</option>
<option
  
  value="ADAMK/Archive-Zip-1.23"
>1.23
  (ADAMK on 2007-11-07)</option>
<option
  
  value="ADAMK/Archive-Zip-1.22"
>1.22
  (ADAMK on 2007-11-02)</option>
<option
  
  value="ADAMK/Archive-Zip-1.21"
>1.21
  (ADAMK on 2007-11-01)</option>
<option
  
  value="ADAMK/Archive-Zip-1.20"
>1.20
  (ADAMK on 2007-06-05)</option>
<option
  
  value="ADAMK/Archive-Zip-1.18"
>1.18
  (ADAMK on 2006-10-25)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_05"
>1.17_05 DEV
  (ADAMK on 2006-10-24)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_03"
>1.17_03 DEV
  (ADAMK on 2006-09-15)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_02"
>1.17_02 DEV
  (ADAMK on 2006-05-07)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_01"
>1.17_01 DEV
  (ADAMK on 2006-04-30)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.15_02"
>1.15_02 DEV
  (SMPETERS on 2005-03-12)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.15_01"
>1.15_01 DEV
  (SMPETERS on 2005-03-10)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.13"
>1.13
  (NEDKONZ on 2004-08-23)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.12_03"
>1.12_03 DEV
  (NEDKONZ on 2004-07-29)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.12_02"
>1.12_02 DEV
  (NEDKONZ on 2004-07-27)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.12"
>1.12
  (NEDKONZ on 2004-07-08)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.11"
>1.11
  (NEDKONZ on 2004-07-08)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1_11"
>1_11
  (NEDKONZ on 2004-07-05)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.10"
>1.10
  (NEDKONZ on 2004-03-25)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.09"
>1.09
  (NEDKONZ on 2003-11-27)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.08"
>1.08
  (NEDKONZ on 2003-10-21)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.07"
>1.07
  (NEDKONZ on 2003-10-20)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.06"
>1.06
  (NEDKONZ on 2003-07-17)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.05"
>1.05
  (NEDKONZ on 2002-09-11)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.04"
>1.04
  (NEDKONZ on 2002-09-11)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.03"
>1.03
  (NEDKONZ on 2002-09-03)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.02"
>1.02
  (NEDKONZ on 2002-08-24)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.01"
>1.01
  (NEDKONZ on 2002-05-11)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.00"
>1.00
  (NEDKONZ on 2002-04-22)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.11"
>0.11
  (NEDKONZ on 2001-01-17)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.10"
>0.10
  (NEDKONZ on 2000-08-08)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.09"
>0.09
  (NEDKONZ on 2000-06-16)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.07"
>0.07
  (NEDKONZ on 2000-03-29)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.06"
>0.06
  (NEDKONZ on 2000-03-22)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/PHRED/Archive-Zip-1.68/diff/' + encodeURIComponent(this.value) + '/lib/Archive/Zip.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="PHRED/Archive-Zip-1.68"
>1.68
  (PHRED on 2020-03-12)</option>
<option
  
  value="PHRED/Archive-Zip-1.67"
>1.67
  (PHRED on 2019-10-07)</option>
<option
  
  value="PHRED/Archive-Zip-1.66"
>1.66
  (PHRED on 2019-09-17)</option>
<option
  
  value="PHRED/Archive-Zip-1.65"
>1.65
  (PHRED on 2019-09-08)</option>
<option
  
  value="PHRED/Archive-Zip-1.64"
>1.64
  (PHRED on 2018-09-12)</option>
<option
  
  value="PHRED/Archive-Zip-1.63"
>1.63
  (PHRED on 2018-08-22)</option>
<option
  
  value="PHRED/Archive-Zip-1.62"
>1.62
  (PHRED on 2018-08-20)</option>
<option
  
  value="PHRED/Archive-Zip-1.61"
>1.61
  (PHRED on 2018-08-19)</option>
<option
  
  value="PHRED/Archive-Zip-1.60"
>1.60
  (PHRED on 2017-12-19)</option>
<option
  
  value="PHRED/Archive-Zip-1.59"
>1.59
  (PHRED on 2016-08-11)</option>
<option
  
  value="PHRED/Archive-Zip-1.58"
>1.58
  (PHRED on 2016-08-02)</option>
<option
  
  value="PHRED/Archive-Zip-1.57"
>1.57
  (PHRED on 2016-04-01)</option>
<option
  
  value="PHRED/Archive-Zip-1.56"
>1.56
  (PHRED on 2015-12-17)</option>
<option
  
  value="PHRED/Archive-Zip-1.55"
>1.55
  (PHRED on 2015-12-04)</option>
<option
  
  value="PHRED/Archive-Zip-1.53"
>1.53
  (PHRED on 2015-09-23)</option>
<option
  
  value="PHRED/Archive-Zip-1.51"
>1.51
  (PHRED on 2015-09-22)</option>
<option
  
  value="PHRED/Archive-Zip-1.50"
>1.50
  (PHRED on 2015-08-26)</option>
<option
  
  value="PHRED/Archive-Zip-1.49"
>1.49
  (PHRED on 2015-07-31)</option>
<option
  
  value="PHRED/Archive-Zip-1.48"
>1.48
  (PHRED on 2015-06-18)</option>
<option
  
  value="PHRED/Archive-Zip-1.47"
>1.47
  (PHRED on 2015-06-17)</option>
<option
  
  value="PHRED/Archive-Zip-1.46"
>1.46
  (PHRED on 2015-03-25)</option>
<option
  
  value="PHRED/Archive-Zip-1.45"
>1.45
  (PHRED on 2015-01-27)</option>
<option
  
  value="PHRED/Archive-Zip-1.44"
>1.44
  (PHRED on 2015-01-24)</option>
<option
  
  value="PHRED/Archive-Zip-1.43"
>1.43
  (PHRED on 2015-01-15)</option>
<option
  
  value="PHRED/Archive-Zip-1.42"
>1.42
  (PHRED on 2015-01-12)</option>
<option
  
  value="PHRED/Archive-Zip-1.41"
>1.41
  (PHRED on 2015-01-10)</option>
<option
  
  value="PHRED/Archive-Zip-1.40"
>1.40
  (PHRED on 2015-01-05)</option>
<option
  
  value="PHRED/Archive-Zip-1.39"
>1.39
  (PHRED on 2014-10-22)</option>
<option
  
  value="PHRED/Archive-Zip-1.38"
>1.38
  (PHRED on 2014-09-02)</option>
<option
  
  value="PHRED/Archive-Zip-1.37"
>1.37
  (PHRED on 2014-01-13)</option>
<option
  
  value="PHRED/Archive-Zip-1.36"
>1.36
  (PHRED on 2013-12-30)</option>
<option
  
  value="PHRED/Archive-Zip-1.35"
>1.35
  (PHRED on 2013-12-30)</option>
<option
  
  value="PHRED/Archive-Zip-1.34"
>1.34
  (PHRED on 2013-12-02)</option>
<option
  
  value="PHRED/Archive-Zip-1.33"
>1.33
  (PHRED on 2013-11-10)</option>
<option
  
  value="PHRED/Archive-Zip-1.32"
>1.32
  (PHRED on 2013-11-09)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_04"
>1.31_04 DEV
  (ADAMK on 2012-01-23)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_03"
>1.31_03 DEV
  (ADAMK on 2011-08-23)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_02"
>1.31_02 DEV
  (ADAMK on 2011-03-08)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_01"
>1.31_01 DEV
  (ADAMK on 2010-03-05)</option>
<option
  
  value="ADAMK/Archive-Zip-1.30"
>1.30
  (ADAMK on 2009-06-30)</option>
<option
  
  value="ADAMK/Archive-Zip-1.29"
>1.29
  (ADAMK on 2009-06-29)</option>
<option
  
  value="ADAMK/Archive-Zip-1.28"
>1.28
  (ADAMK on 2009-06-16)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.16"
>1.16
  (SMPETERS on 2005-07-04)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.15"
>1.15
  (SMPETERS on 2005-06-22)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.14"
>1.14
  (NEDKONZ on 2004-10-21)</option>
<optgroup label="BackPAN">'
<option
  
  value="ADAMK/Archive-Zip-1.27_01"
>1.27_01 DEV
  (ADAMK on 2008-12-16)</option>
<option
  
  value="ADAMK/Archive-Zip-1.26"
>1.26
  (ADAMK on 2008-10-12)</option>
<option
  
  value="ADAMK/Archive-Zip-1.25"
>1.25
  (ADAMK on 2008-10-10)</option>
<option
  
  value="ADAMK/Archive-Zip-1.24"
>1.24
  (ADAMK on 2008-08-23)</option>
<option
  
  value="ADAMK/Archive-Zip-1.23"
>1.23
  (ADAMK on 2007-11-07)</option>
<option
  
  value="ADAMK/Archive-Zip-1.22"
>1.22
  (ADAMK on 2007-11-02)</option>
<option
  
  value="ADAMK/Archive-Zip-1.21"
>1.21
  (ADAMK on 2007-11-01)</option>
<option
  
  value="ADAMK/Archive-Zip-1.20"
>1.20
  (ADAMK on 2007-06-05)</option>
<option
  
  value="ADAMK/Archive-Zip-1.18"
>1.18
  (ADAMK on 2006-10-25)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_05"
>1.17_05 DEV
  (ADAMK on 2006-10-24)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_03"
>1.17_03 DEV
  (ADAMK on 2006-09-15)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_02"
>1.17_02 DEV
  (ADAMK on 2006-05-07)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_01"
>1.17_01 DEV
  (ADAMK on 2006-04-30)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.15_02"
>1.15_02 DEV
  (SMPETERS on 2005-03-12)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.15_01"
>1.15_01 DEV
  (SMPETERS on 2005-03-10)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.13"
>1.13
  (NEDKONZ on 2004-08-23)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.12_03"
>1.12_03 DEV
  (NEDKONZ on 2004-07-29)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.12_02"
>1.12_02 DEV
  (NEDKONZ on 2004-07-27)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.12"
>1.12
  (NEDKONZ on 2004-07-08)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.11"
>1.11
  (NEDKONZ on 2004-07-08)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1_11"
>1_11
  (NEDKONZ on 2004-07-05)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.10"
>1.10
  (NEDKONZ on 2004-03-25)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.09"
>1.09
  (NEDKONZ on 2003-11-27)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.08"
>1.08
  (NEDKONZ on 2003-10-21)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.07"
>1.07
  (NEDKONZ on 2003-10-20)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.06"
>1.06
  (NEDKONZ on 2003-07-17)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.05"
>1.05
  (NEDKONZ on 2002-09-11)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.04"
>1.04
  (NEDKONZ on 2002-09-11)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.03"
>1.03
  (NEDKONZ on 2002-09-03)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.02"
>1.02
  (NEDKONZ on 2002-08-24)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.01"
>1.01
  (NEDKONZ on 2002-05-11)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.00"
>1.00
  (NEDKONZ on 2002-04-22)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.11"
>0.11
  (NEDKONZ on 2001-01-17)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.10"
>0.10
  (NEDKONZ on 2000-08-08)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.09"
>0.09
  (NEDKONZ on 2000-06-16)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.07"
>0.07
  (NEDKONZ on 2000-03-29)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.06"
>0.06
  (NEDKONZ on 2000-03-22)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/Compress::Raw::Zlib" title="Compress::Raw::Zlib" class="ellipsis">Compress::Raw::Zlib</a></li>
  <li><a href="https://metacpan.org/pod/Encode" title="Encode" class="ellipsis">Encode</a></li>
  <li><a href="https://metacpan.org/pod/File::Basename" title="File::Basename" class="ellipsis">File::Basename</a></li>
  <li><a href="https://metacpan.org/pod/File::Copy" title="File::Copy" class="ellipsis">File::Copy</a></li>
  <li><a href="https://metacpan.org/pod/File::Find" title="File::Find" class="ellipsis">File::Find</a></li>
  <li><a href="https://metacpan.org/pod/File::Path" title="File::Path" class="ellipsis">File::Path</a></li>
  <li><a href="https://metacpan.org/pod/File::Spec" title="File::Spec" class="ellipsis">File::Spec</a></li>
  <li><a href="https://metacpan.org/pod/File::Temp" title="File::Temp" class="ellipsis">File::Temp</a></li>
  <li><a href="https://metacpan.org/pod/IO::File" title="IO::File" class="ellipsis">IO::File</a></li>
  <li><a href="https://metacpan.org/pod/IO::Handle" title="IO::Handle" class="ellipsis">IO::Handle</a></li>
  <li><a href="https://metacpan.org/pod/IO::Seekable" title="IO::Seekable" class="ellipsis">IO::Seekable</a></li>
  <li><a href="https://metacpan.org/pod/Time::Local" title="Time::Local" class="ellipsis">Time::Local</a></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Archive::Zip/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Archive%3A%3AZip">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Archive-Zip">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/PHRED/Archive-Zip-1.68/view/lib/Archive/Zip.pm">This version</a>
    </li>
    <li>
      <a href="./Archive::Zip.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/AZAWAWI"><img src="https://www.gravatar.com/avatar/70ebafdecf974e15bcaba4cbe39efef1?d=identicon&amp;s=20" title="AZAWAWI" alt="AZAWAWI"></a>
<a class="display-all" href="https://metacpan.org/author/XLAT"><img src="https://www.gravatar.com/avatar/a477fe9cd31dd7f08e1962deff6ef5c5?d=identicon&amp;s=20" title="XLAT" alt="XLAT"></a>
<a class="display-all" href="https://metacpan.org/author/DMOL"><img src="https://www.gravatar.com/avatar/78b28a931707c0fa696996adc7702db9?d=identicon&amp;s=20" title="DMOL" alt="DMOL"></a>
<a class="display-all" href="https://metacpan.org/author/CHANKEY"><img src="https://www.gravatar.com/avatar/5e3dc77d6818da1eba913fe7f3fed8ce?d=identicon&amp;s=20" title="CHANKEY" alt="CHANKEY"></a>
<a class="display-all" href="https://metacpan.org/author/ILUX"><img src="https://www.gravatar.com/avatar/1cd0eea5e6ca13346060bb9d2c1e286b?d=identicon&amp;s=20" title="ILUX" alt="ILUX"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Archive-Zip/plussers">22 PAUSE users</a>
</div>
<div>
    14 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 1 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
      data-contrib-email="perl@bike-nomad.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Ned Konz
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/PHRED" class="author-name">Fred Moyer</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Archive/Zip.pm&#39;" class="">
<option
  selected
  value="PHRED/Archive-Zip-1.68"
>1.68
  (PHRED on 2020-03-12)</option>
<option
  
  value="PHRED/Archive-Zip-1.67"
>1.67
  (PHRED on 2019-10-07)</option>
<option
  
  value="PHRED/Archive-Zip-1.66"
>1.66
  (PHRED on 2019-09-17)</option>
<option
  
  value="PHRED/Archive-Zip-1.65"
>1.65
  (PHRED on 2019-09-08)</option>
<option
  
  value="PHRED/Archive-Zip-1.64"
>1.64
  (PHRED on 2018-09-12)</option>
<option
  
  value="PHRED/Archive-Zip-1.63"
>1.63
  (PHRED on 2018-08-22)</option>
<option
  
  value="PHRED/Archive-Zip-1.62"
>1.62
  (PHRED on 2018-08-20)</option>
<option
  
  value="PHRED/Archive-Zip-1.61"
>1.61
  (PHRED on 2018-08-19)</option>
<option
  
  value="PHRED/Archive-Zip-1.60"
>1.60
  (PHRED on 2017-12-19)</option>
<option
  
  value="PHRED/Archive-Zip-1.59"
>1.59
  (PHRED on 2016-08-11)</option>
<option
  
  value="PHRED/Archive-Zip-1.58"
>1.58
  (PHRED on 2016-08-02)</option>
<option
  
  value="PHRED/Archive-Zip-1.57"
>1.57
  (PHRED on 2016-04-01)</option>
<option
  
  value="PHRED/Archive-Zip-1.56"
>1.56
  (PHRED on 2015-12-17)</option>
<option
  
  value="PHRED/Archive-Zip-1.55"
>1.55
  (PHRED on 2015-12-04)</option>
<option
  
  value="PHRED/Archive-Zip-1.53"
>1.53
  (PHRED on 2015-09-23)</option>
<option
  
  value="PHRED/Archive-Zip-1.51"
>1.51
  (PHRED on 2015-09-22)</option>
<option
  
  value="PHRED/Archive-Zip-1.50"
>1.50
  (PHRED on 2015-08-26)</option>
<option
  
  value="PHRED/Archive-Zip-1.49"
>1.49
  (PHRED on 2015-07-31)</option>
<option
  
  value="PHRED/Archive-Zip-1.48"
>1.48
  (PHRED on 2015-06-18)</option>
<option
  
  value="PHRED/Archive-Zip-1.47"
>1.47
  (PHRED on 2015-06-17)</option>
<option
  
  value="PHRED/Archive-Zip-1.46"
>1.46
  (PHRED on 2015-03-25)</option>
<option
  
  value="PHRED/Archive-Zip-1.45"
>1.45
  (PHRED on 2015-01-27)</option>
<option
  
  value="PHRED/Archive-Zip-1.44"
>1.44
  (PHRED on 2015-01-24)</option>
<option
  
  value="PHRED/Archive-Zip-1.43"
>1.43
  (PHRED on 2015-01-15)</option>
<option
  
  value="PHRED/Archive-Zip-1.42"
>1.42
  (PHRED on 2015-01-12)</option>
<option
  
  value="PHRED/Archive-Zip-1.41"
>1.41
  (PHRED on 2015-01-10)</option>
<option
  
  value="PHRED/Archive-Zip-1.40"
>1.40
  (PHRED on 2015-01-05)</option>
<option
  
  value="PHRED/Archive-Zip-1.39"
>1.39
  (PHRED on 2014-10-22)</option>
<option
  
  value="PHRED/Archive-Zip-1.38"
>1.38
  (PHRED on 2014-09-02)</option>
<option
  
  value="PHRED/Archive-Zip-1.37"
>1.37
  (PHRED on 2014-01-13)</option>
<option
  
  value="PHRED/Archive-Zip-1.36"
>1.36
  (PHRED on 2013-12-30)</option>
<option
  
  value="PHRED/Archive-Zip-1.35"
>1.35
  (PHRED on 2013-12-30)</option>
<option
  
  value="PHRED/Archive-Zip-1.34"
>1.34
  (PHRED on 2013-12-02)</option>
<option
  
  value="PHRED/Archive-Zip-1.33"
>1.33
  (PHRED on 2013-11-10)</option>
<option
  
  value="PHRED/Archive-Zip-1.32"
>1.32
  (PHRED on 2013-11-09)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_04"
>1.31_04 DEV
  (ADAMK on 2012-01-23)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_03"
>1.31_03 DEV
  (ADAMK on 2011-08-23)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_02"
>1.31_02 DEV
  (ADAMK on 2011-03-08)</option>
<option
  
  value="ADAMK/Archive-Zip-1.31_01"
>1.31_01 DEV
  (ADAMK on 2010-03-05)</option>
<option
  
  value="ADAMK/Archive-Zip-1.30"
>1.30
  (ADAMK on 2009-06-30)</option>
<option
  
  value="ADAMK/Archive-Zip-1.29"
>1.29
  (ADAMK on 2009-06-29)</option>
<option
  
  value="ADAMK/Archive-Zip-1.28"
>1.28
  (ADAMK on 2009-06-16)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.16"
>1.16
  (SMPETERS on 2005-07-04)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.15"
>1.15
  (SMPETERS on 2005-06-22)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.14"
>1.14
  (NEDKONZ on 2004-10-21)</option>
<optgroup label="BackPAN">'
<option
  
  value="ADAMK/Archive-Zip-1.27_01"
>1.27_01 DEV
  (ADAMK on 2008-12-16)</option>
<option
  
  value="ADAMK/Archive-Zip-1.26"
>1.26
  (ADAMK on 2008-10-12)</option>
<option
  
  value="ADAMK/Archive-Zip-1.25"
>1.25
  (ADAMK on 2008-10-10)</option>
<option
  
  value="ADAMK/Archive-Zip-1.24"
>1.24
  (ADAMK on 2008-08-23)</option>
<option
  
  value="ADAMK/Archive-Zip-1.23"
>1.23
  (ADAMK on 2007-11-07)</option>
<option
  
  value="ADAMK/Archive-Zip-1.22"
>1.22
  (ADAMK on 2007-11-02)</option>
<option
  
  value="ADAMK/Archive-Zip-1.21"
>1.21
  (ADAMK on 2007-11-01)</option>
<option
  
  value="ADAMK/Archive-Zip-1.20"
>1.20
  (ADAMK on 2007-06-05)</option>
<option
  
  value="ADAMK/Archive-Zip-1.18"
>1.18
  (ADAMK on 2006-10-25)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_05"
>1.17_05 DEV
  (ADAMK on 2006-10-24)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_03"
>1.17_03 DEV
  (ADAMK on 2006-09-15)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_02"
>1.17_02 DEV
  (ADAMK on 2006-05-07)</option>
<option
  
  value="ADAMK/Archive-Zip-1.17_01"
>1.17_01 DEV
  (ADAMK on 2006-04-30)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.15_02"
>1.15_02 DEV
  (SMPETERS on 2005-03-12)</option>
<option
  
  value="SMPETERS/Archive-Zip-1.15_01"
>1.15_01 DEV
  (SMPETERS on 2005-03-10)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.13"
>1.13
  (NEDKONZ on 2004-08-23)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.12_03"
>1.12_03 DEV
  (NEDKONZ on 2004-07-29)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.12_02"
>1.12_02 DEV
  (NEDKONZ on 2004-07-27)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.12"
>1.12
  (NEDKONZ on 2004-07-08)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.11"
>1.11
  (NEDKONZ on 2004-07-08)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1_11"
>1_11
  (NEDKONZ on 2004-07-05)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.10"
>1.10
  (NEDKONZ on 2004-03-25)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.09"
>1.09
  (NEDKONZ on 2003-11-27)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.08"
>1.08
  (NEDKONZ on 2003-10-21)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.07"
>1.07
  (NEDKONZ on 2003-10-20)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.06"
>1.06
  (NEDKONZ on 2003-07-17)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.05"
>1.05
  (NEDKONZ on 2002-09-11)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.04"
>1.04
  (NEDKONZ on 2002-09-11)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.03"
>1.03
  (NEDKONZ on 2002-09-03)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.02"
>1.02
  (NEDKONZ on 2002-08-24)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.01"
>1.01
  (NEDKONZ on 2002-05-11)</option>
<option
  
  value="NEDKONZ/Archive-Zip-1.00"
>1.00
  (NEDKONZ on 2002-04-22)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.11"
>0.11
  (NEDKONZ on 2001-01-17)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.10"
>0.10
  (NEDKONZ on 2000-08-08)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.09"
>0.09
  (NEDKONZ on 2000-06-16)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.07"
>0.07
  (NEDKONZ on 2000-03-29)</option>
<option
  
  value="NEDKONZ/Archive-Zip-0.06"
>0.06
  (NEDKONZ on 2000-03-22)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Archive-Zip">Archive-Zip-1.68</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage four &#10;
          • 161 direct dependents &#10;          • 1061 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="15"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Archive-Zip-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Archive-Zip-1.68">
    <input type="hidden" name="author" value="PHRED">
    <input type="hidden" name="distribution" value="Archive-Zip">
    <button type="submit" class="favorite highlight"><span>36</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Archive::Zip.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>36</span> ++</a>
</div>
   / <span>Archive::Zip</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Archive::Zip.html#NAME">NAME</a></li>
  <li><a href="./Archive::Zip.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./Archive::Zip.html#DESCRIPTION">DESCRIPTION</a>
    <ul>
      <li><a href="./Archive::Zip.html#File-Naming">File Naming</a></li>
      <li><a href="./Archive::Zip.html#Archive::Zip-Object-Model">Archive::Zip Object Model</a>
        <ul>
          <li><a href="./Archive::Zip.html#Overview">Overview</a></li>
        </ul>
      </li>
      <li><a href="./Archive::Zip.html#Inheritance">Inheritance</a></li>
    </ul>
  </li>
  <li><a href="./Archive::Zip.html#EXPORTS">EXPORTS</a></li>
  <li><a href="./Archive::Zip.html#ERROR-CODES">ERROR CODES</a>
    <ul>
      <li><a href="./Archive::Zip.html#Compression">Compression</a></li>
      <li><a href="./Archive::Zip.html#Compression-Levels">Compression Levels</a></li>
    </ul>
  </li>
  <li><a href="./Archive::Zip.html#Archive::Zip-Methods">Archive::Zip Methods</a>
    <ul>
      <li><a href="./Archive::Zip.html#Constructor">Constructor</a></li>
      <li><a href="./Archive::Zip.html#Zip-Archive-Utility-Methods">Zip Archive Utility Methods</a></li>
      <li><a href="./Archive::Zip.html#Zip-Archive-Accessors">Zip Archive Accessors</a></li>
      <li><a href="./Archive::Zip.html#Zip-Archive-Member-Operations">Zip Archive Member Operations</a></li>
      <li><a href="./Archive::Zip.html#Zip-Archive-I/O-operations">Zip Archive I/O operations</a></li>
      <li><a href="./Archive::Zip.html#Zip-Archive-Tree-operations">Zip Archive Tree operations</a></li>
    </ul>
  </li>
  <li><a href="./Archive::Zip.html#Archive::Zip-Global-Variables">Archive::Zip Global Variables</a></li>
  <li><a href="./Archive::Zip.html#MEMBER-OPERATIONS">MEMBER OPERATIONS</a>
    <ul>
      <li><a href="./Archive::Zip.html#Member-Class-Methods">Member Class Methods</a></li>
      <li><a href="./Archive::Zip.html#Member-Simple-Accessors">Member Simple Accessors</a></li>
      <li><a href="./Archive::Zip.html#Low-level-member-data-reading">Low-level member data reading</a></li>
    </ul>
  </li>
  <li><a href="./Archive::Zip.html#Archive::Zip::FileMember-methods">Archive::Zip::FileMember methods</a></li>
  <li><a href="./Archive::Zip.html#Archive::Zip::ZipFileMember-methods">Archive::Zip::ZipFileMember methods</a></li>
  <li><a href="./Archive::Zip.html#REQUIRED-MODULES">REQUIRED MODULES</a></li>
  <li><a href="./Archive::Zip.html#BUGS-AND-CAVEATS">BUGS AND CAVEATS</a>
    <ul>
      <li><a href="./Archive::Zip.html#When-not-to-use-Archive::Zip">When not to use Archive::Zip</a></li>
      <li><a href="./Archive::Zip.html#Zip64-Format-Support">Zip64 Format Support</a></li>
      <li><a href="./Archive::Zip.html#versionMadeBy-and-versionNeededToExtract">versionMadeBy and versionNeededToExtract</a></li>
      <li><a href="./Archive::Zip.html#Try-to-avoid-IO::Scalar">Try to avoid IO::Scalar</a></li>
      <li><a href="./Archive::Zip.html#Wrong-password-for-encrypted-members">Wrong password for encrypted members</a></li>
    </ul>
  </li>
  <li><a href="./Archive::Zip.html#TO-DO">TO DO</a></li>
  <li><a href="./Archive::Zip.html#SUPPORT">SUPPORT</a></li>
  <li><a href="./Archive::Zip.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./Archive::Zip.html#COPYRIGHT">COPYRIGHT</a></li>
  <li><a href="./Archive::Zip.html#SEE-ALSO">SEE ALSO</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Archive::Zip - Provide an interface to ZIP archive files.</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code>   # Create a Zip file
   use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
   my $zip = Archive::Zip-&gt;new();

   # Add a directory
   my $dir_member = $zip-&gt;addDirectory( &#39;dirname/&#39; );

   # Add a file from a string with compression
   my $string_member = $zip-&gt;addString( &#39;This is a test&#39;, &#39;stringMember.txt&#39; );
   $string_member-&gt;desiredCompressionMethod( COMPRESSION_DEFLATED );

   # Add a file from disk
   my $file_member = $zip-&gt;addFile( &#39;xyz.pl&#39;, &#39;AnotherName.pl&#39; );

   # Save the Zip file
   unless ( $zip-&gt;writeToFileNamed(&#39;someZip.zip&#39;) == AZ_OK ) {
       die &#39;write error&#39;;
   }

   # Read a Zip file
   my $somezip = Archive::Zip-&gt;new();
   unless ( $somezip-&gt;read( &#39;someZip.zip&#39; ) == AZ_OK ) {
       die &#39;read error&#39;;
   }

   # Change the compression type for a file in the Zip
   my $member = $somezip-&gt;memberNamed( &#39;stringMember.txt&#39; );
   $member-&gt;desiredCompressionMethod( COMPRESSION_STORED );
   unless ( $zip-&gt;writeToFileNamed( &#39;someOtherZip.zip&#39; ) == AZ_OK ) {
       die &#39;write error&#39;;
   }</code></pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>The Archive::Zip module allows a Perl program to create, manipulate, read, and write Zip archive files.</p>

<p>Zip archives can be created, or you can read from existing zip files.</p>

<p>Once created, they can be written to files, streams, or strings. Members can be added, removed, extracted, replaced, rearranged, and enumerated. They can also be renamed or have their dates, comments, or other attributes queried or modified. Their data can be compressed or uncompressed as needed.</p>

<p>Members can be created from members in existing Zip files, or from existing directories, files, or strings.</p>

<p>This module uses the <a href="https://metacpan.org/pod/Compress::Raw::Zlib">Compress::Raw::Zlib</a> library to read and write the compressed streams inside the files.</p>

<p>One can use <a href="https://metacpan.org/pod/Archive::Zip::MemberRead">Archive::Zip::MemberRead</a> to read the zip file archive members as if they were files.</p>

<h2 id="File-Naming"><a id="File"></a>File Naming</h2>

<p>Regardless of what your local file system uses for file naming, names in a Zip file are in Unix format (<i>forward</i> slashes (/) separating directory names, etc.).</p>

<p><code>Archive::Zip</code> tries to be consistent with file naming conventions, and will translate back and forth between native and Zip file names.</p>

<p>However, it can&#39;t guess which format names are in. So two rules control what kind of file name you must pass various routines:</p>

<dl>

<dt id="Names-of-files-are-in-local-format."><a id="Names"></a><a id="Names-of-files-are-in-local-format"></a>Names of files are in local format.</dt>
<dd>

<p><code>File::Spec</code> and <code>File::Basename</code> are used for various file operations. When you&#39;re referring to a file on your system, use its file naming conventions.</p>

</dd>
<dt id="Names-of-archive-members-are-in-Unix-format."><a id="Names1"></a><a id="Names-of-archive-members-are-in-Unix-format"></a>Names of archive members are in Unix format.</dt>
<dd>

<p>This applies to every method that refers to an archive member, or provides a name for new archive members. The <code>extract()</code> methods that can take one or two names will convert from local to zip names if you call them with a single name.</p>

</dd>
</dl>

<h2 id="Archive::Zip-Object-Model"><a id="Archive"></a>Archive::Zip Object Model</h2>

<h3 id="Overview">Overview</h3>

<p>Archive::Zip::Archive objects are what you ordinarily deal with. These maintain the structure of a zip file, without necessarily holding data. When a zip is read from a disk file, the (possibly compressed) data still lives in the file, not in memory. Archive members hold information about the individual members, but not (usually) the actual member data. When the zip is written to a (different) file, the member data is compressed or copied as needed. It is possible to make archive members whose data is held in a string in memory, but this is not done when a zip file is read. Directory members don&#39;t have any data.</p>

<h2 id="Inheritance">Inheritance</h2>

<pre><code>  Exporter
   Archive::Zip                            Common base class, has defs.
       Archive::Zip::Archive               A Zip archive.
       Archive::Zip::Member                Abstract superclass for all members.
           Archive::Zip::StringMember      Member made from a string
           Archive::Zip::FileMember        Member made from an external file
               Archive::Zip::ZipFileMember Member that lives in a zip file
               Archive::Zip::NewFileMember Member whose data is in a file
           Archive::Zip::DirectoryMember   Member that is a directory</code></pre>

<h1 id="EXPORTS">EXPORTS</h1>

<dl>

<dt id=":CONSTANTS"><a id="CONSTANTS"></a>:CONSTANTS</dt>
<dd>

<p>Exports the following constants:</p>

<p>FA_MSDOS FA_UNIX GPBF_ENCRYPTED_MASK GPBF_DEFLATING_COMPRESSION_MASK GPBF_HAS_DATA_DESCRIPTOR_MASK COMPRESSION_STORED COMPRESSION_DEFLATED IFA_TEXT_FILE_MASK IFA_TEXT_FILE IFA_BINARY_FILE COMPRESSION_LEVEL_NONE COMPRESSION_LEVEL_DEFAULT COMPRESSION_LEVEL_FASTEST COMPRESSION_LEVEL_BEST_COMPRESSION ZIP64_SUPPORTED ZIP64_AS_NEEDED ZIP64_EOCD ZIP64_HEADERS</p>

</dd>
<dt id=":MISC_CONSTANTS"><a id="MISC_CONSTANTS"></a>:MISC_CONSTANTS</dt>
<dd>

<p>Exports the following constants (only necessary for extending the module):</p>

<p>FA_AMIGA FA_VAX_VMS FA_VM_CMS FA_ATARI_ST FA_OS2_HPFS FA_MACINTOSH FA_Z_SYSTEM FA_CPM FA_WINDOWS_NTFS GPBF_IMPLODING_8K_SLIDING_DICTIONARY_MASK GPBF_IMPLODING_3_SHANNON_FANO_TREES_MASK GPBF_IS_COMPRESSED_PATCHED_DATA_MASK COMPRESSION_SHRUNK DEFLATING_COMPRESSION_NORMAL DEFLATING_COMPRESSION_MAXIMUM DEFLATING_COMPRESSION_FAST DEFLATING_COMPRESSION_SUPER_FAST COMPRESSION_REDUCED_1 COMPRESSION_REDUCED_2 COMPRESSION_REDUCED_3 COMPRESSION_REDUCED_4 COMPRESSION_IMPLODED COMPRESSION_TOKENIZED COMPRESSION_DEFLATED_ENHANCED COMPRESSION_PKWARE_DATA_COMPRESSION_LIBRARY_IMPLODED</p>

</dd>
<dt id=":ERROR_CODES"><a id="ERROR_CODES"></a>:ERROR_CODES</dt>
<dd>

<p>Explained below. Returned from most methods.</p>

<p>AZ_OK AZ_STREAM_END AZ_ERROR AZ_FORMAT_ERROR AZ_IO_ERROR</p>

</dd>
</dl>

<h1 id="ERROR-CODES"><a id="ERROR"></a>ERROR CODES</h1>

<p>Many of the methods in Archive::Zip return error codes. These are implemented as inline subroutines, using the <code>use constant</code> pragma. They can be imported into your namespace using the <code>:ERROR_CODES</code> tag:</p>

<pre><code>  use Archive::Zip qw( :ERROR_CODES );

  ...

  unless ( $zip-&gt;read( &#39;myfile.zip&#39; ) == AZ_OK ) {
      die &quot;whoops!&quot;;
  }</code></pre>

<dl>

<dt id="AZ_OK-(0)"><a id="AZ_OK"></a><a id="AZ_OK--0"></a>AZ_OK (0)</dt>
<dd>

<p>Everything is fine.</p>

</dd>
<dt id="AZ_STREAM_END-(1)"><a id="AZ_STREAM_END"></a><a id="AZ_STREAM_END--1"></a>AZ_STREAM_END (1)</dt>
<dd>

<p>The read stream (or central directory) ended normally.</p>

</dd>
<dt id="AZ_ERROR-(2)"><a id="AZ_ERROR"></a><a id="AZ_ERROR--2"></a>AZ_ERROR (2)</dt>
<dd>

<p>There was some generic kind of error.</p>

</dd>
<dt id="AZ_FORMAT_ERROR-(3)"><a id="AZ_FORMAT_ERROR"></a><a id="AZ_FORMAT_ERROR--3"></a>AZ_FORMAT_ERROR (3)</dt>
<dd>

<p>There is a format error in a ZIP file being read.</p>

</dd>
<dt id="AZ_IO_ERROR-(4)"><a id="AZ_IO_ERROR"></a><a id="AZ_IO_ERROR--4"></a>AZ_IO_ERROR (4)</dt>
<dd>

<p>There was an IO error.</p>

</dd>
</dl>

<h2 id="Compression">Compression</h2>

<p>Archive::Zip allows each member of a ZIP file to be compressed (using the Deflate algorithm) or uncompressed.</p>

<p>Other compression algorithms that some versions of ZIP have been able to produce are not supported. Each member has two compression methods: the one it&#39;s stored as (this is always COMPRESSION_STORED for string and external file members), and the one you desire for the member in the zip file.</p>

<p>These can be different, of course, so you can make a zip member that is not compressed out of one that is, and vice versa.</p>

<p>You can inquire about the current compression and set the desired compression method:</p>

<pre><code>  my $member = $zip-&gt;memberNamed( &#39;xyz.txt&#39; );
  $member-&gt;compressionMethod();    # return current compression

  # set to read uncompressed
  $member-&gt;desiredCompressionMethod( COMPRESSION_STORED );

  # set to read compressed
  $member-&gt;desiredCompressionMethod( COMPRESSION_DEFLATED );</code></pre>

<p>There are two different compression methods:</p>

<dl>

<dt id="COMPRESSION_STORED">COMPRESSION_STORED</dt>
<dd>

<p>File is stored (no compression)</p>

</dd>
<dt id="COMPRESSION_DEFLATED">COMPRESSION_DEFLATED</dt>
<dd>

<p>File is Deflated</p>

</dd>
</dl>

<h2 id="Compression-Levels"><a id="Compression1"></a>Compression Levels</h2>

<p>If a member&#39;s desiredCompressionMethod is COMPRESSION_DEFLATED, you can choose different compression levels. This choice may affect the speed of compression and decompression, as well as the size of the compressed member data.</p>

<pre><code>  $member-&gt;desiredCompressionLevel( 9 );</code></pre>

<p>The levels given can be:</p>

<ul>

<li><p>0 or COMPRESSION_LEVEL_NONE</p>

<p>This is the same as saying</p>

<pre><code>  $member-&gt;desiredCompressionMethod( COMPRESSION_STORED );</code></pre>

</li>
<li><p>1 .. 9</p>

<p>1 gives the best speed and worst compression, and 9 gives the best compression and worst speed.</p>

</li>
<li><p>COMPRESSION_LEVEL_FASTEST</p>

<p>This is a synonym for level 1.</p>

</li>
<li><p>COMPRESSION_LEVEL_BEST_COMPRESSION</p>

<p>This is a synonym for level 9.</p>

</li>
<li><p>COMPRESSION_LEVEL_DEFAULT</p>

<p>This gives a good compromise between speed and compression, and is currently equivalent to 6 (this is in the zlib code). This is the level that will be used if not specified.</p>

</li>
</ul>

<h1 id="Archive::Zip-Methods"><a id="Archive1"></a>Archive::Zip Methods</h1>

<p>The Archive::Zip class (and its invisible subclass Archive::Zip::Archive) implement generic zip file functionality. Creating a new Archive::Zip object actually makes an Archive::Zip::Archive object, but you don&#39;t have to worry about this unless you&#39;re subclassing.</p>

<h2 id="Constructor">Constructor</h2>

<dl>

<dt id="new(-[$fileName]-)"><a id="new"></a><a id="new---fileName"></a>new( [$fileName] )</dt>
<dd>

</dd>
<dt id="new(-{-filename-=&gt;-$fileName-}-)"><a id="new1"></a><a id="new----filename----fileName"></a>new( { filename =&gt; $fileName } )</dt>
<dd>

<p>Make a new, empty zip archive.</p>

<pre><code>    my $zip = Archive::Zip-&gt;new();</code></pre>

<p>If an additional argument is passed, new() will call read() to read the contents of an archive:</p>

<pre><code>    my $zip = Archive::Zip-&gt;new( &#39;xyz.zip&#39; );</code></pre>

<p>If a filename argument is passed and the read fails for any reason, new will return undef. For this reason, it may be better to call read separately.</p>

</dd>
</dl>

<h2 id="Zip-Archive-Utility-Methods"><a id="Zip"></a>Zip Archive Utility Methods</h2>

<p>These Archive::Zip methods may be called as functions or as object methods. Do not call them as class methods:</p>

<pre><code>    $zip = Archive::Zip-&gt;new();
    $crc = Archive::Zip::computeCRC32( &#39;ghijkl&#39; );    # OK
    $crc = $zip-&gt;computeCRC32( &#39;ghijkl&#39; );            # also OK
    $crc = Archive::Zip-&gt;computeCRC32( &#39;ghijkl&#39; );    # NOT OK</code></pre>

<dl>

<dt id="Archive::Zip::computeCRC32(-$string-[,-$crc]-)"><a id="Archive2"></a><a id="Archive::Zip::computeCRC32---string----crc"></a>Archive::Zip::computeCRC32( $string [, $crc] )</dt>
<dd>

</dd>
<dt id="Archive::Zip::computeCRC32(-{-string-=&gt;-$string-[,-checksum-=&gt;-$crc-]-}-)"><a id="Archive3"></a><a id="Archive::Zip::computeCRC32----string----string---checksum----crc"></a>Archive::Zip::computeCRC32( { string =&gt; $string [, checksum =&gt; $crc ] } )</dt>
<dd>

<p>This is a utility function that uses the Compress::Raw::Zlib CRC routine to compute a CRC-32. You can get the CRC of a string:</p>

<pre><code>    $crc = Archive::Zip::computeCRC32( $string );</code></pre>

<p>Or you can compute the running CRC:</p>

<pre><code>    $crc = 0;
    $crc = Archive::Zip::computeCRC32( &#39;abcdef&#39;, $crc );
    $crc = Archive::Zip::computeCRC32( &#39;ghijkl&#39;, $crc );</code></pre>

</dd>
<dt id="Archive::Zip::setChunkSize(-$number-)"><a id="Archive4"></a><a id="Archive::Zip::setChunkSize---number"></a>Archive::Zip::setChunkSize( $number )</dt>
<dd>

</dd>
<dt id="Archive::Zip::setChunkSize(-{-chunkSize-=&gt;-$number-}-)"><a id="Archive5"></a><a id="Archive::Zip::setChunkSize----chunkSize----number"></a>Archive::Zip::setChunkSize( { chunkSize =&gt; $number } )</dt>
<dd>

<p>Report or change chunk size used for reading and writing. This can make big differences in dealing with large files. Currently, this defaults to 32K. This also changes the chunk size used for Compress::Raw::Zlib. You must call setChunkSize() before reading or writing. This is not exportable, so you must call it like:</p>

<pre><code>    Archive::Zip::setChunkSize( 4096 );</code></pre>

<p>or as a method on a zip (though this is a global setting). Returns old chunk size.</p>

</dd>
<dt id="Archive::Zip::chunkSize()"><a id="Archive6"></a><a id="Archive::Zip::chunkSize"></a>Archive::Zip::chunkSize()</dt>
<dd>

<p>Returns the current chunk size:</p>

<pre><code>    my $chunkSize = Archive::Zip::chunkSize();</code></pre>

</dd>
<dt id="Archive::Zip::setErrorHandler(-\&amp;subroutine-)"><a id="Archive7"></a><a id="Archive::Zip::setErrorHandler---subroutine"></a>Archive::Zip::setErrorHandler( \&amp;subroutine )</dt>
<dd>

</dd>
<dt id="Archive::Zip::setErrorHandler(-{-subroutine-=&gt;-\&amp;subroutine-}-)"><a id="Archive8"></a><a id="Archive::Zip::setErrorHandler----subroutine----subroutine"></a>Archive::Zip::setErrorHandler( { subroutine =&gt; \&amp;subroutine } )</dt>
<dd>

<p>Change the subroutine called with error strings. This defaults to \&amp;Carp::carp, but you may want to change it to get the error strings. This is not exportable, so you must call it like:</p>

<pre><code>    Archive::Zip::setErrorHandler( \&amp;myErrorHandler );</code></pre>

<p>If myErrorHandler is undef, resets handler to default. Returns old error handler. Note that if you call Carp::carp or a similar routine or if you&#39;re chaining to the default error handler from your error handler, you may want to increment the number of caller levels that are skipped (do not just set it to a number):</p>

<pre><code>    $Carp::CarpLevel++;</code></pre>

</dd>
<dt id="Archive::Zip::tempFile(-[-$tmpdir-]-)"><a id="Archive9"></a><a id="Archive::Zip::tempFile-----tmpdir"></a>Archive::Zip::tempFile( [ $tmpdir ] )</dt>
<dd>

</dd>
<dt id="Archive::Zip::tempFile(-{-tempDir-=&gt;-$tmpdir-}-)"><a id="Archive10"></a><a id="Archive::Zip::tempFile----tempDir----tmpdir"></a>Archive::Zip::tempFile( { tempDir =&gt; $tmpdir } )</dt>
<dd>

<p>Create a uniquely named temp file. It will be returned open for read/write. If <code>$tmpdir</code> is given, it is used as the name of a directory to create the file in. If not given, creates the file using <code>File::Spec::tmpdir()</code>. Generally, you can override this choice using the</p>

<pre><code>    $ENV{TMPDIR}</code></pre>

<p>environment variable. But see the <a href="https://metacpan.org/pod/File::Spec">File::Spec</a> documentation for your system. Note that on many systems, if you&#39;re running in taint mode, then you must make sure that <code>$ENV{TMPDIR}</code> is untainted for it to be used. Will <i>NOT</i> create <code>$tmpdir</code> if it does not exist (this is a change from prior versions!). Returns file handle and name:</p>

<pre><code>    my ($fh, $name) = Archive::Zip::tempFile();
    my ($fh, $name) = Archive::Zip::tempFile(&#39;myTempDir&#39;);
    my $fh = Archive::Zip::tempFile();  # if you don&#39;t need the name</code></pre>

</dd>
</dl>

<h2 id="Zip-Archive-Accessors"><a id="Zip1"></a>Zip Archive Accessors</h2>

<dl>

<dt id="members()"><a id="members"></a>members()</dt>
<dd>

<p>Return a copy of the members array</p>

<pre><code>    my @members = $zip-&gt;members();</code></pre>

</dd>
<dt id="numberOfMembers()"><a id="numberOfMembers"></a>numberOfMembers()</dt>
<dd>

<p>Return the number of members I have</p>

</dd>
<dt id="memberNames()"><a id="memberNames"></a>memberNames()</dt>
<dd>

<p>Return a list of the (internal) file names of the zip members</p>

</dd>
<dt id="memberNamed(-$string-)"><a id="memberNamed"></a><a id="memberNamed---string"></a>memberNamed( $string )</dt>
<dd>

</dd>
<dt id="memberNamed(-{-zipName-=&gt;-$string-}-)"><a id="memberNamed1"></a><a id="memberNamed----zipName----string"></a>memberNamed( { zipName =&gt; $string } )</dt>
<dd>

<p>Return ref to member whose filename equals given filename or undef. <code>$string</code> must be in Zip (Unix) filename format.</p>

</dd>
<dt id="membersMatching(-$regex-)"><a id="membersMatching"></a><a id="membersMatching---regex"></a>membersMatching( $regex )</dt>
<dd>

</dd>
<dt id="membersMatching(-{-regex-=&gt;-$regex-}-)"><a id="membersMatching1"></a><a id="membersMatching----regex----regex"></a>membersMatching( { regex =&gt; $regex } )</dt>
<dd>

<p>Return array of members whose filenames match given regular expression in list context. Returns number of matching members in scalar context.</p>

<pre><code>    my @textFileMembers = $zip-&gt;membersMatching( &#39;.*\.txt&#39; );
    # or
    my $numberOfTextFiles = $zip-&gt;membersMatching( &#39;.*\.txt&#39; );</code></pre>

</dd>
<dt id="zip64()"><a id="zip64"></a>zip64()</dt>
<dd>

<p>Returns whether the previous read or write of the archive has been done in zip64 format.</p>

</dd>
<dt id="desiredZip64Mode()"><a id="desiredZip64Mode"></a>desiredZip64Mode()</dt>
<dd>

<p>Gets or sets which parts of the archive should be written in zip64 format: All parts as needed (ZIP64_AS_NEEDED), the default, force writing the zip64 end of central directory record (ZIP64_EOCD), force writing the zip64 EOCD record and all headers in zip64 format (ZIP64_HEADERS).</p>

</dd>
<dt id="versionMadeBy()"><a id="versionMadeBy"></a>versionMadeBy()</dt>
<dd>

</dd>
<dt id="versionNeededToExtract()"><a id="versionNeededToExtract"></a>versionNeededToExtract()</dt>
<dd>

<p>Gets the fields from the zip64 end of central directory record. These are always 0 if the archive is not in zip64 format.</p>

</dd>
<dt id="diskNumber()"><a id="diskNumber"></a>diskNumber()</dt>
<dd>

<p>Return the disk that I start on. Not used for writing zips, but might be interesting if you read a zip in. This should be 0, as Archive::Zip does not handle multi-volume archives.</p>

</dd>
<dt id="diskNumberWithStartOfCentralDirectory()"><a id="diskNumberWithStartOfCentralDirectory"></a>diskNumberWithStartOfCentralDirectory()</dt>
<dd>

<p>Return the disk number that holds the beginning of the central directory. Not used for writing zips, but might be interesting if you read a zip in. This should be 0, as Archive::Zip does not handle multi-volume archives.</p>

</dd>
<dt id="numberOfCentralDirectoriesOnThisDisk()"><a id="numberOfCentralDirectoriesOnThisDisk"></a>numberOfCentralDirectoriesOnThisDisk()</dt>
<dd>

<p>Return the number of CD structures in the zipfile last read in. Not used for writing zips, but might be interesting if you read a zip in.</p>

</dd>
<dt id="numberOfCentralDirectories()"><a id="numberOfCentralDirectories"></a>numberOfCentralDirectories()</dt>
<dd>

<p>Return the number of CD structures in the zipfile last read in. Not used for writing zips, but might be interesting if you read a zip in.</p>

</dd>
<dt id="centralDirectorySize()"><a id="centralDirectorySize"></a>centralDirectorySize()</dt>
<dd>

<p>Returns central directory size, as read from an external zip file. Not used for writing zips, but might be interesting if you read a zip in.</p>

</dd>
<dt id="centralDirectoryOffsetWRTStartingDiskNumber()"><a id="centralDirectoryOffsetWRTStartingDiskNumber"></a>centralDirectoryOffsetWRTStartingDiskNumber()</dt>
<dd>

<p>Returns the offset into the zip file where the CD begins. Not used for writing zips, but might be interesting if you read a zip in.</p>

</dd>
<dt id="zipfileComment(-[-$string-]-)"><a id="zipfileComment"></a><a id="zipfileComment-----string"></a>zipfileComment( [ $string ] )</dt>
<dd>

</dd>
<dt id="zipfileComment(-[-{-comment-=&gt;-$string-}-]-)"><a id="zipfileComment1"></a><a id="zipfileComment------comment----string"></a>zipfileComment( [ { comment =&gt; $string } ] )</dt>
<dd>

<p>Get or set the zipfile comment. Returns the old comment.</p>

<pre><code>    print $zip-&gt;zipfileComment();
    $zip-&gt;zipfileComment( &#39;New Comment&#39; );</code></pre>

</dd>
<dt id="eocdOffset()"><a id="eocdOffset"></a>eocdOffset()</dt>
<dd>

<p>Returns the (unexpected) number of bytes between where the EOCD was found and where it expected to be. This is normally 0, but would be positive if something (a virus, perhaps) had added bytes somewhere before the EOCD. Not used for writing zips, but might be interesting if you read a zip in. Here is an example of how you can diagnose this:</p>

<pre><code>  my $zip = Archive::Zip-&gt;new(&#39;somefile.zip&#39;);
  if ($zip-&gt;eocdOffset())
  {
    warn &quot;A virus has added &quot;, $zip-&gt;eocdOffset, &quot; bytes of garbage\n&quot;;
  }</code></pre>

<p>The <code>eocdOffset()</code> is used to adjust the starting position of member headers, if necessary.</p>

</dd>
<dt id="fileName()"><a id="fileName"></a>fileName()</dt>
<dd>

<p>Returns the name of the file last read from. If nothing has been read yet, returns an empty string; if read from a file handle, returns the handle in string form.</p>

</dd>
</dl>

<h2 id="Zip-Archive-Member-Operations"><a id="Zip2"></a>Zip Archive Member Operations</h2>

<p>Various operations on a zip file modify members. When a member is passed as an argument, you can either use a reference to the member itself, or the name of a member. Of course, using the name requires that names be unique within a zip (this is not enforced).</p>

<dl>

<dt id="removeMember(-$memberOrName-)"><a id="removeMember"></a><a id="removeMember---memberOrName"></a>removeMember( $memberOrName )</dt>
<dd>

</dd>
<dt id="removeMember(-{-memberOrZipName-=&gt;-$memberOrName-}-)"><a id="removeMember1"></a><a id="removeMember----memberOrZipName----memberOrName"></a>removeMember( { memberOrZipName =&gt; $memberOrName } )</dt>
<dd>

<p>Remove and return the given member, or match its name and remove it. Returns undef if member or name does not exist in this Zip. No-op if member does not belong to this zip.</p>

</dd>
<dt id="replaceMember(-$memberOrName,-$newMember-)"><a id="replaceMember"></a><a id="replaceMember---memberOrName---newMember"></a>replaceMember( $memberOrName, $newMember )</dt>
<dd>

</dd>
<dt id="replaceMember(-{-memberOrZipName-=&gt;-$memberOrName,-newMember-=&gt;-$newMember-}-)"><a id="replaceMember1"></a><a id="replaceMember----memberOrZipName----memberOrName--newMember----newMember"></a>replaceMember( { memberOrZipName =&gt; $memberOrName, newMember =&gt; $newMember } )</dt>
<dd>

<p>Remove and return the given member, or match its name and remove it. Replace with new member. Returns undef if member or name does not exist in this Zip, or if <code>$newMember</code> is undefined.</p>

<p>It is an (undiagnosed) error to provide a <code>$newMember</code> that is a member of the zip being modified.</p>

<pre><code>    my $member1 = $zip-&gt;removeMember( &#39;xyz&#39; );
    my $member2 = $zip-&gt;replaceMember( &#39;abc&#39;, $member1 );
    # now, $member2 (named &#39;abc&#39;) is not in $zip,
    # and $member1 (named &#39;xyz&#39;) is, having taken $member2&#39;s place.</code></pre>

</dd>
<dt id="extractMember(-$memberOrName-[,-$extractedName-]-)"><a id="extractMember"></a><a id="extractMember---memberOrName----extractedName"></a>extractMember( $memberOrName [, $extractedName ] )</dt>
<dd>

</dd>
<dt id="extractMember(-{-memberOrZipName-=&gt;-$memberOrName-[,-name-=&gt;-$extractedName-]-}-)"><a id="extractMember1"></a><a id="extractMember----memberOrZipName----memberOrName---name----extractedName"></a>extractMember( { memberOrZipName =&gt; $memberOrName [, name =&gt; $extractedName ] } )</dt>
<dd>

<p>Extract the given member, or match its name and extract it. Returns undef if member does not exist in this Zip. If optional second arg is given, use it as the name of the extracted member. Otherwise, the internal filename of the member is used as the name of the extracted file or directory. If you pass <code>$extractedName</code>, it should be in the local file system&#39;s format. If you do not pass <code>$extractedName</code> and the internal filename traverses a parent directory or a symbolic link, the extraction will be aborted with <code>AC_ERROR</code> for security reason. All necessary directories will be created. Returns <code>AZ_OK</code> on success.</p>

</dd>
<dt id="extractMemberWithoutPaths(-$memberOrName-[,-$extractedName-]-)"><a id="extractMemberWithoutPaths"></a><a id="extractMemberWithoutPaths---memberOrName----extractedName"></a>extractMemberWithoutPaths( $memberOrName [, $extractedName ] )</dt>
<dd>

</dd>
<dt id="extractMemberWithoutPaths(-{-memberOrZipName-=&gt;-$memberOrName-[,-name-=&gt;-$extractedName-]-}-)"><a id="extractMemberWithoutPaths1"></a><a id="extractMemberWithoutPaths----memberOrZipName----memberOrName---name----extractedName"></a>extractMemberWithoutPaths( { memberOrZipName =&gt; $memberOrName [, name =&gt; $extractedName ] } )</dt>
<dd>

<p>Extract the given member, or match its name and extract it. Does not use path information (extracts into the current directory). Returns undef if member does not exist in this Zip. If optional second arg is given, use it as the name of the extracted member (its paths will be deleted too). Otherwise, the internal filename of the member (minus paths) is used as the name of the extracted file or directory. Returns <code>AZ_OK</code> on success. If you do not pass <code>$extractedName</code> and the internal filename is equalled to a local symbolic link, the extraction will be aborted with <code>AC_ERROR</code> for security reason.</p>

</dd>
<dt id="addMember(-$member-)"><a id="addMember"></a><a id="addMember---member"></a>addMember( $member )</dt>
<dd>

</dd>
<dt id="addMember(-{-member-=&gt;-$member-}-)"><a id="addMember1"></a><a id="addMember----member----member"></a>addMember( { member =&gt; $member } )</dt>
<dd>

<p>Append a member (possibly from another zip file) to the zip file. Returns the new member. Generally, you will use addFile(), addDirectory(), addFileOrDirectory(), addString(), or read() to add members.</p>

<pre><code>    # Move member named &#39;abc&#39; to end of zip:
    my $member = $zip-&gt;removeMember( &#39;abc&#39; );
    $zip-&gt;addMember( $member );</code></pre>

</dd>
<dt id="updateMember(-$memberOrName,-$fileName-)"><a id="updateMember"></a><a id="updateMember---memberOrName---fileName"></a>updateMember( $memberOrName, $fileName )</dt>
<dd>

</dd>
<dt id="updateMember(-{-memberOrZipName-=&gt;-$memberOrName,-name-=&gt;-$fileName-}-)"><a id="updateMember1"></a><a id="updateMember----memberOrZipName----memberOrName--name----fileName"></a>updateMember( { memberOrZipName =&gt; $memberOrName, name =&gt; $fileName } )</dt>
<dd>

<p>Update a single member from the file or directory named <code>$fileName</code>. Returns the (possibly added or updated) member, if any; <code>undef</code> on errors. The comparison is based on <code>lastModTime()</code> and (in the case of a non-directory) the size of the file.</p>

</dd>
<dt id="addFile(-$fileName-[,-$newName,-$compressionLevel-]-)"><a id="addFile"></a><a id="addFile---fileName----newName---compressionLevel"></a>addFile( $fileName [, $newName, $compressionLevel ] )</dt>
<dd>

</dd>
<dt id="addFile(-{-filename-=&gt;-$fileName-[,-zipName-=&gt;-$newName,-compressionLevel-=&gt;-$compressionLevel-}-]-)"><a id="addFile1"></a><a id="addFile----filename----fileName---zipName----newName--compressionLevel----compressionLevel"></a>addFile( { filename =&gt; $fileName [, zipName =&gt; $newName, compressionLevel =&gt; $compressionLevel } ] )</dt>
<dd>

<p>Append a member whose data comes from an external file, returning the member or undef. The member will have its file name set to the name of the external file, and its desiredCompressionMethod set to COMPRESSION_DEFLATED. The file attributes and last modification time will be set from the file. If the name given does not represent a readable plain file or symbolic link, undef will be returned. <code>$fileName</code> must be in the format required for the local file system. The optional <code>$newName</code> argument sets the internal file name to something different than the given $fileName. <code>$newName</code>, if given, must be in Zip name format (i.e. Unix). The text mode bit will be set if the contents appears to be text (as returned by the <code>-T</code> perl operator).</p>

<p><i>NOTE</i> that you should not (generally) use absolute path names in zip member names, as this will cause problems with some zip tools as well as introduce a security hole and make the zip harder to use.</p>

</dd>
<dt id="addDirectory(-$directoryName-[,-$fileName-]-)"><a id="addDirectory"></a><a id="addDirectory---directoryName----fileName"></a>addDirectory( $directoryName [, $fileName ] )</dt>
<dd>

</dd>
<dt id="addDirectory(-{-directoryName-=&gt;-$directoryName-[,-zipName-=&gt;-$fileName-]-}-)"><a id="addDirectory1"></a><a id="addDirectory----directoryName----directoryName---zipName----fileName"></a>addDirectory( { directoryName =&gt; $directoryName [, zipName =&gt; $fileName ] } )</dt>
<dd>

<p>Append a member created from the given directory name. The directory name does not have to name an existing directory. If the named directory exists, the file modification time and permissions are set from the existing directory, otherwise they are set to now and permissive default permissions. <code>$directoryName</code> must be in local file system format. The optional second argument sets the name of the archive member (which defaults to <code>$directoryName</code>). If given, it must be in Zip (Unix) format. Returns the new member.</p>

</dd>
<dt id="addFileOrDirectory(-$name-[,-$newName,-$compressionLevel-]-)"><a id="addFileOrDirectory"></a><a id="addFileOrDirectory---name----newName---compressionLevel"></a>addFileOrDirectory( $name [, $newName, $compressionLevel ] )</dt>
<dd>

</dd>
<dt id="addFileOrDirectory(-{-name-=&gt;-$name-[,-zipName-=&gt;-$newName,-compressionLevel-=&gt;-$compressionLevel-]-}-)"><a id="addFileOrDirectory1"></a><a id="addFileOrDirectory----name----name---zipName----newName--compressionLevel----compressionLevel"></a>addFileOrDirectory( { name =&gt; $name [, zipName =&gt; $newName, compressionLevel =&gt; $compressionLevel ] } )</dt>
<dd>

<p>Append a member from the file or directory named $name. If $newName is given, use it for the name of the new member. Will add or remove trailing slashes from $newName as needed. <code>$name</code> must be in local file system format. The optional second argument sets the name of the archive member (which defaults to <code>$name</code>). If given, it must be in Zip (Unix) format.</p>

</dd>
<dt id="addString(-$stringOrStringRef,-$name,-[$compressionLevel]-)"><a id="addString"></a><a id="addString---stringOrStringRef---name---compressionLevel"></a>addString( $stringOrStringRef, $name, [$compressionLevel] )</dt>
<dd>

</dd>
<dt id="addString(-{-string-=&gt;-$stringOrStringRef-[,-zipName-=&gt;-$name,-compressionLevel-=&gt;-$compressionLevel-]-}-)"><a id="addString1"></a><a id="addString----string----stringOrStringRef---zipName----name--compressionLevel----compressionLevel"></a>addString( { string =&gt; $stringOrStringRef [, zipName =&gt; $name, compressionLevel =&gt; $compressionLevel ] } )</dt>
<dd>

<p>Append a member created from the given string or string reference. The name is given by the second argument. Returns the new member. The last modification time will be set to now, and the file attributes will be set to permissive defaults.</p>

<pre><code>    my $member = $zip-&gt;addString( &#39;This is a test&#39;, &#39;test.txt&#39; );</code></pre>

</dd>
<dt id="contents(-$memberOrMemberName-[,-$newContents-]-)"><a id="contents"></a><a id="contents---memberOrMemberName----newContents"></a>contents( $memberOrMemberName [, $newContents ] )</dt>
<dd>

</dd>
<dt id="contents(-{-memberOrZipName-=&gt;-$memberOrMemberName-[,-contents-=&gt;-$newContents-]-}-)"><a id="contents1"></a><a id="contents----memberOrZipName----memberOrMemberName---contents----newContents"></a>contents( { memberOrZipName =&gt; $memberOrMemberName [, contents =&gt; $newContents ] } )</dt>
<dd>

<p>Returns the uncompressed data for a particular member, or undef.</p>

<pre><code>    print &quot;xyz.txt contains &quot; . $zip-&gt;contents( &#39;xyz.txt&#39; );</code></pre>

<p>Also can change the contents of a member:</p>

<pre><code>    $zip-&gt;contents( &#39;xyz.txt&#39;, &#39;This is the new contents&#39; );</code></pre>

<p>If called expecting an array as the return value, it will include the status as the second value in the array.</p>

<pre><code>    ($content, $status) = $zip-&gt;contents( &#39;xyz.txt&#39;);</code></pre>

</dd>
</dl>

<h2 id="Zip-Archive-I/O-operations"><a id="Zip3"></a><a id="Zip-Archive-I-O-operations"></a>Zip Archive I/O operations</h2>

<p>A Zip archive can be written to a file or file handle, or read from one.</p>

<dl>

<dt id="writeToFileNamed(-$fileName-)"><a id="writeToFileNamed"></a><a id="writeToFileNamed---fileName"></a>writeToFileNamed( $fileName )</dt>
<dd>

</dd>
<dt id="writeToFileNamed(-{-fileName-=&gt;-$fileName-}-)"><a id="writeToFileNamed1"></a><a id="writeToFileNamed----fileName----fileName"></a>writeToFileNamed( { fileName =&gt; $fileName } )</dt>
<dd>

<p>Write a zip archive to named file. Returns <code>AZ_OK</code> on success.</p>

<pre><code>    my $status = $zip-&gt;writeToFileNamed( &#39;xx.zip&#39; );
    die &quot;error somewhere&quot; if $status != AZ_OK;</code></pre>

<p>Note that if you use the same name as an existing zip file that you read in, you will clobber ZipFileMembers. So instead, write to a different file name, then delete the original. If you use the <code>overwrite()</code> or <code>overwriteAs()</code> methods, you can re-write the original zip in this way. <code>$fileName</code> should be a valid file name on your system.</p>

</dd>
<dt id="writeToFileHandle(-$fileHandle-[,-$seekable]-)"><a id="writeToFileHandle"></a><a id="writeToFileHandle---fileHandle----seekable"></a>writeToFileHandle( $fileHandle [, $seekable] )</dt>
<dd>

<p>Write a zip archive to a file handle. Return AZ_OK on success. The optional second arg tells whether or not to try to seek backwards to re-write headers. If not provided, it is set if the Perl <code>-f</code> test returns true. This could fail on some operating systems, though.</p>

<pre><code>    my $fh = IO::File-&gt;new( &#39;someFile.zip&#39;, &#39;w&#39; );
    unless ( $zip-&gt;writeToFileHandle( $fh ) == AZ_OK ) {
        # error handling
    }</code></pre>

<p>If you pass a file handle that is not seekable (like if you&#39;re writing to a pipe or a socket), pass a false second argument:</p>

<pre><code>    my $fh = IO::File-&gt;new( &#39;| cat &gt; somefile.zip&#39;, &#39;w&#39; );
    $zip-&gt;writeToFileHandle( $fh, 0 );   # fh is not seekable</code></pre>

<p>If this method fails during the write of a member, that member and all following it will return false from <code>wasWritten()</code>. See writeCentralDirectory() for a way to deal with this. If you want, you can write data to the file handle before passing it to writeToFileHandle(); this could be used (for instance) for making self-extracting archives. However, this only works reliably when writing to a real file (as opposed to STDOUT or some other possible non-file).</p>

<p>See examples/selfex.pl for how to write a self-extracting archive.</p>

</dd>
<dt id="writeCentralDirectory(-$fileHandle-[,-$offset-]-)"><a id="writeCentralDirectory"></a><a id="writeCentralDirectory---fileHandle----offset"></a>writeCentralDirectory( $fileHandle [, $offset ] )</dt>
<dd>

</dd>
<dt id="writeCentralDirectory(-{-fileHandle-=&gt;-$fileHandle-[,-offset-=&gt;-$offset-]-}-)"><a id="writeCentralDirectory1"></a><a id="writeCentralDirectory----fileHandle----fileHandle---offset----offset"></a>writeCentralDirectory( { fileHandle =&gt; $fileHandle [, offset =&gt; $offset ] } )</dt>
<dd>

<p>Writes the central directory structure to the given file handle.</p>

<p>Returns AZ_OK on success. If given an $offset, will seek to that point before writing. This can be used for recovery in cases where writeToFileHandle or writeToFileNamed returns an IO error because of running out of space on the destination file.</p>

<p>You can truncate the zip by seeking backwards and then writing the directory:</p>

<pre><code>    my $fh = IO::File-&gt;new( &#39;someFile.zip&#39;, &#39;w&#39; );
        my $retval = $zip-&gt;writeToFileHandle( $fh );
    if ( $retval == AZ_IO_ERROR ) {
        my @unwritten = grep { not $_-&gt;wasWritten() } $zip-&gt;members();
        if (@unwritten) {
            $zip-&gt;removeMember( $member ) foreach my $member ( @unwritten );
            $zip-&gt;writeCentralDirectory( $fh,
            $unwritten[0]-&gt;writeLocalHeaderRelativeOffset());
        }
    }</code></pre>

</dd>
<dt id="overwriteAs(-$newName-)"><a id="overwriteAs"></a><a id="overwriteAs---newName"></a>overwriteAs( $newName )</dt>
<dd>

</dd>
<dt id="overwriteAs(-{-filename-=&gt;-$newName-}-)"><a id="overwriteAs1"></a><a id="overwriteAs----filename----newName"></a>overwriteAs( { filename =&gt; $newName } )</dt>
<dd>

<p>Write the zip to the specified file, as safely as possible. This is done by first writing to a temp file, then renaming the original if it exists, then renaming the temp file, then deleting the renamed original if it exists. Returns AZ_OK if successful.</p>

</dd>
<dt id="overwrite()"><a id="overwrite"></a>overwrite()</dt>
<dd>

<p>Write back to the original zip file. See overwriteAs() above. If the zip was not ever read from a file, this generates an error.</p>

</dd>
<dt id="read(-$fileName-)"><a id="read"></a><a id="read---fileName"></a>read( $fileName )</dt>
<dd>

</dd>
<dt id="read(-{-filename-=&gt;-$fileName-}-)"><a id="read1"></a><a id="read----filename----fileName"></a>read( { filename =&gt; $fileName } )</dt>
<dd>

<p>Read zipfile headers from a zip file, appending new members. Returns <code>AZ_OK</code> or error code.</p>

<pre><code>    my $zipFile = Archive::Zip-&gt;new();
    my $status = $zipFile-&gt;read( &#39;/some/FileName.zip&#39; );</code></pre>

</dd>
<dt id="readFromFileHandle(-$fileHandle,-$filename-)"><a id="readFromFileHandle"></a><a id="readFromFileHandle---fileHandle---filename"></a>readFromFileHandle( $fileHandle, $filename )</dt>
<dd>

</dd>
<dt id="readFromFileHandle(-{-fileHandle-=&gt;-$fileHandle,-filename-=&gt;-$filename-}-)"><a id="readFromFileHandle1"></a><a id="readFromFileHandle----fileHandle----fileHandle--filename----filename"></a>readFromFileHandle( { fileHandle =&gt; $fileHandle, filename =&gt; $filename } )</dt>
<dd>

<p>Read zipfile headers from an already-opened file handle, appending new members. Does not close the file handle. Returns <code>AZ_OK</code> or error code. Note that this requires a seekable file handle; reading from a stream is not yet supported, but using in-memory data is.</p>

<pre><code>    my $fh = IO::File-&gt;new( &#39;/some/FileName.zip&#39;, &#39;r&#39; );
    my $zip1 = Archive::Zip-&gt;new();
    my $status = $zip1-&gt;readFromFileHandle( $fh );
    my $zip2 = Archive::Zip-&gt;new();
    $status = $zip2-&gt;readFromFileHandle( $fh );</code></pre>

<p>Read zip using in-memory data (recursable):</p>

<pre><code>    open my $fh, &quot;&lt;&quot;, &quot;archive.zip&quot; or die $!;
    my $zip_data = do { local $.; &lt;$fh&gt; };
    my $zip = Archive::Zip-&gt;new;
    open my $dh, &quot;+&lt;&quot;, \$zip_data;
    $zip-&gt;readFromFileHandle ($dh);</code></pre>

</dd>
</dl>

<h2 id="Zip-Archive-Tree-operations"><a id="Zip4"></a>Zip Archive Tree operations</h2>

<p>These used to be in Archive::Zip::Tree but got moved into Archive::Zip. They enable operation on an entire tree of members or files. A usage example:</p>

<pre><code>  use Archive::Zip;
  my $zip = Archive::Zip-&gt;new();

  # add all readable files and directories below . as xyz/*
  $zip-&gt;addTree( &#39;.&#39;, &#39;xyz&#39; );

  # add all readable plain files below /abc as def/*
  $zip-&gt;addTree( &#39;/abc&#39;, &#39;def&#39;, sub { -f &amp;&amp; -r } );

  # add all .c files below /tmp as stuff/*
  $zip-&gt;addTreeMatching( &#39;/tmp&#39;, &#39;stuff&#39;, &#39;\.c$&#39; );

  # add all .o files below /tmp as stuff/* if they aren&#39;t writable
  $zip-&gt;addTreeMatching( &#39;/tmp&#39;, &#39;stuff&#39;, &#39;\.o$&#39;, sub { ! -w } );

  # add all .so files below /tmp that are smaller than 200 bytes as stuff/*
  $zip-&gt;addTreeMatching( &#39;/tmp&#39;, &#39;stuff&#39;, &#39;\.o$&#39;, sub { -s &lt; 200 } );

  # and write them into a file
  $zip-&gt;writeToFileNamed(&#39;xxx.zip&#39;);

  # now extract the same files into /tmpx
  $zip-&gt;extractTree( &#39;stuff&#39;, &#39;/tmpx&#39; );</code></pre>

<dl>

<dt id="$zip-&gt;addTree(-$root,-$dest-[,-$pred,-$compressionLevel-]-)-Add-tree-of-files-to-a-zip"><a id="zip--addTree---root---dest----pred---compressionLevel-----Add-tree-of-files-to-a-zip"></a>$zip-&gt;addTree( $root, $dest [, $pred, $compressionLevel ] ) -- Add tree of files to a zip</dt>
<dd>

</dd>
<dt id="$zip-&gt;addTree(-{-root-=&gt;-$root,-zipName-=&gt;-$dest-[,-select-=&gt;-$pred,-compressionLevel-=&gt;-$compressionLevel-]-)"><a id="zip--addTree----root----root--zipName----dest---select----pred--compressionLevel----compressionLevel"></a>$zip-&gt;addTree( { root =&gt; $root, zipName =&gt; $dest [, select =&gt; $pred, compressionLevel =&gt; $compressionLevel ] )</dt>
<dd>

<p><code>$root</code> is the root of the tree of files and directories to be added. It is a valid directory name on your system. <code>$dest</code> is the name for the root in the zip file (undef or blank means to use relative pathnames). It is a valid ZIP directory name (that is, it uses forward slashes (/) for separating directory components). <code>$pred</code> is an optional subroutine reference to select files: it is passed the name of the prospective file or directory using <code>$_</code>, and if it returns true, the file or directory will be included. The default is to add all readable files and directories. For instance, using</p>

<pre><code>  my $pred = sub { /\.txt/ };
  $zip-&gt;addTree( &#39;.&#39;, &#39;&#39;, $pred );</code></pre>

<p>will add all the .txt files in and below the current directory, using relative names, and making the names identical in the zipfile:</p>

<pre><code>  original name           zip member name
  ./xyz                   xyz
  ./a/                    a/
  ./a/b                   a/b</code></pre>

<p>To translate absolute to relative pathnames, just pass them in: $zip-&gt;addTree( &#39;/c/d&#39;, &#39;a&#39; );</p>

<pre><code>  original name           zip member name
  /c/d/xyz                a/xyz
  /c/d/a/                 a/a/
  /c/d/a/b                a/a/b</code></pre>

<p>Returns AZ_OK on success. Note that this will not follow symbolic links to directories. Note also that this does not check for the validity of filenames.</p>

<p>Note that you generally <i>don&#39;t</i> want to make zip archive member names absolute.</p>

</dd>
<dt id="$zip-&gt;addTreeMatching(-$root,-$dest,-$pattern-[,-$pred,-$compressionLevel-]-)"><a id="zip--addTreeMatching---root---dest---pattern----pred---compressionLevel"></a>$zip-&gt;addTreeMatching( $root, $dest, $pattern [, $pred, $compressionLevel ] )</dt>
<dd>

</dd>
<dt id="$zip-&gt;addTreeMatching(-{-root-=&gt;-$root,-zipName-=&gt;-$dest,-pattern-=&gt;-$pattern-[,-select-=&gt;-$pred,-compressionLevel-=&gt;-$compressionLevel-]-}-)"><a id="zip--addTreeMatching----root----root--zipName----dest--pattern----pattern---select----pred--compressionLevel----compressionLevel"></a>$zip-&gt;addTreeMatching( { root =&gt; $root, zipName =&gt; $dest, pattern =&gt; $pattern [, select =&gt; $pred, compressionLevel =&gt; $compressionLevel ] } )</dt>
<dd>

<p>$root is the root of the tree of files and directories to be added $dest is the name for the root in the zip file (undef means to use relative pathnames) $pattern is a (non-anchored) regular expression for filenames to match $pred is an optional subroutine reference to select files: it is passed the name of the prospective file or directory in <code>$_</code>, and if it returns true, the file or directory will be included. The default is to add all readable files and directories. To add all files in and below the current directory whose names end in <code>.pl</code>, and make them extract into a subdirectory named <code>xyz</code>, do this:</p>

<pre><code>  $zip-&gt;addTreeMatching( &#39;.&#39;, &#39;xyz&#39;, &#39;\.pl$&#39; )</code></pre>

<p>To add all <i>writable</i> files in and below the directory named <code>/abc</code> whose names end in <code>.pl</code>, and make them extract into a subdirectory named <code>xyz</code>, do this:</p>

<pre><code>  $zip-&gt;addTreeMatching( &#39;/abc&#39;, &#39;xyz&#39;, &#39;\.pl$&#39;, sub { -w } )</code></pre>

<p>Returns AZ_OK on success. Note that this will not follow symbolic links to directories.</p>

</dd>
<dt id="$zip-&gt;updateTree(-$root-[,-$dest-,-$pred-,-$mirror,-$compressionLevel-]-);"><a id="zip--updateTree---root----dest----pred----mirror---compressionLevel"></a>$zip-&gt;updateTree( $root [, $dest , $pred , $mirror, $compressionLevel ] );</dt>
<dd>

</dd>
<dt id="$zip-&gt;updateTree(-{-root-=&gt;-$root-[,-zipName-=&gt;-$dest,-select-=&gt;-$pred,-mirror-=&gt;-$mirror,-compressionLevel-=&gt;-$compressionLevel-]-}-);"><a id="zip--updateTree----root----root---zipName----dest--select----pred--mirror----mirror--compressionLevel----compressionLevel"></a>$zip-&gt;updateTree( { root =&gt; $root [, zipName =&gt; $dest, select =&gt; $pred, mirror =&gt; $mirror, compressionLevel =&gt; $compressionLevel ] } );</dt>
<dd>

<p>Update a zip file from a directory tree.</p>

<p><code>updateTree()</code> takes the same arguments as <code>addTree()</code>, but first checks to see whether the file or directory already exists in the zip file, and whether it has been changed.</p>

<p>If the fourth argument <code>$mirror</code> is true, then delete all my members if corresponding files were not found.</p>

<p>Returns an error code or AZ_OK if all is well.</p>

</dd>
<dt id="$zip-&gt;extractTree(-[-$root,-$dest,-$volume-}-]-)"><a id="zip--extractTree-----root---dest---volume"></a>$zip-&gt;extractTree( [ $root, $dest, $volume } ] )</dt>
<dd>

</dd>
<dt id="$zip-&gt;extractTree(-[-{-root-=&gt;-$root,-zipName-=&gt;-$dest,-volume-=&gt;-$volume-}-]-)"><a id="zip--extractTree------root----root--zipName----dest--volume----volume"></a>$zip-&gt;extractTree( [ { root =&gt; $root, zipName =&gt; $dest, volume =&gt; $volume } ] )</dt>
<dd>

<p>If you don&#39;t give any arguments at all, will extract all the files in the zip with their original names.</p>

<p>If you supply one argument for <code>$root</code>, <code>extractTree</code> will extract all the members whose names start with <code>$root</code> into the current directory, stripping off <code>$root</code> first. <code>$root</code> is in Zip (Unix) format. For instance,</p>

<pre><code>  $zip-&gt;extractTree( &#39;a&#39; );</code></pre>

<p>when applied to a zip containing the files: a/x a/b/c ax/d/e d/e will extract:</p>

<p>a/x as ./x</p>

<p>a/b/c as ./b/c</p>

<p>If you give two arguments, <code>extractTree</code> extracts all the members whose names start with <code>$root</code>. It will translate <code>$root</code> into <code>$dest</code> to construct the destination file name. <code>$root</code> and <code>$dest</code> are in Zip (Unix) format. For instance,</p>

<pre><code>   $zip-&gt;extractTree( &#39;a&#39;, &#39;d/e&#39; );</code></pre>

<p>when applied to a zip containing the files: a/x a/b/c ax/d/e d/e will extract:</p>

<p>a/x to d/e/x</p>

<p>a/b/c to d/e/b/c and ignore ax/d/e and d/e</p>

<p>If you give three arguments, <code>extractTree</code> extracts all the members whose names start with <code>$root</code>. It will translate <code>$root</code> into <code>$dest</code> to construct the destination file name, and then it will convert to local file system format, using <code>$volume</code> as the name of the destination volume.</p>

<p><code>$root</code> and <code>$dest</code> are in Zip (Unix) format.</p>

<p><code>$volume</code> is in local file system format.</p>

<p>For instance, under Windows,</p>

<pre><code>   $zip-&gt;extractTree( &#39;a&#39;, &#39;d/e&#39;, &#39;f:&#39; );</code></pre>

<p>when applied to a zip containing the files: a/x a/b/c ax/d/e d/e will extract:</p>

<p>a/x to f:d/e/x</p>

<p>a/b/c to f:d/e/b/c and ignore ax/d/e and d/e</p>

<p>If you want absolute paths (the prior example used paths relative to the current directory on the destination volume, you can specify these in <code>$dest</code>:</p>

<pre><code>   $zip-&gt;extractTree( &#39;a&#39;, &#39;/d/e&#39;, &#39;f:&#39; );</code></pre>

<p>when applied to a zip containing the files: a/x a/b/c ax/d/e d/e will extract:</p>

<p>a/x to f:\d\e\x</p>

<p>a/b/c to f:\d\e\b\c and ignore ax/d/e and d/e</p>

<p>If the path to the extracted file traverses a parent directory or a symbolic link, the extraction will be aborted with <code>AC_ERROR</code> for security reason. Returns an error code or AZ_OK if everything worked OK.</p>

</dd>
</dl>

<h1 id="Archive::Zip-Global-Variables"><a id="Archive11"></a>Archive::Zip Global Variables</h1>

<dl>

<dt id="$Archive::Zip::UNICODE"><a id="Archive::Zip::UNICODE"></a>$Archive::Zip::UNICODE</dt>
<dd>

<p>This variable governs how Unicode file and directory names are added to or extracted from an archive. If set, file and directory names are considered to be UTF-8 encoded. This is <i>EXPERIMENTAL AND BUGGY (there are some edge cases on Win32)</i>. Please report problems.</p>

<pre><code>    {
        local $Archive::Zip::UNICODE = 1;
        $zip-&gt;addFile(&#39;D&eacute;j&agrave; vu.txt&#39;);
    }</code></pre>

</dd>
</dl>

<h1 id="MEMBER-OPERATIONS"><a id="MEMBER"></a>MEMBER OPERATIONS</h1>

<h2 id="Member-Class-Methods"><a id="Member"></a>Member Class Methods</h2>

<p>Several constructors allow you to construct members without adding them to a zip archive. These work the same as the addFile(), addDirectory(), and addString() zip instance methods described above, but they don&#39;t add the new members to a zip.</p>

<dl>

<dt id="Archive::Zip::Member-&gt;newFromString(-$stringOrStringRef-[,-$fileName-]-)"><a id="Archive12"></a><a id="Archive::Zip::Member--newFromString---stringOrStringRef----fileName"></a>Archive::Zip::Member-&gt;newFromString( $stringOrStringRef [, $fileName ] )</dt>
<dd>

</dd>
<dt id="Archive::Zip::Member-&gt;newFromString(-{-string-=&gt;-$stringOrStringRef-[,-zipName-=&gt;-$fileName-]-)"><a id="Archive13"></a><a id="Archive::Zip::Member--newFromString----string----stringOrStringRef---zipName----fileName"></a>Archive::Zip::Member-&gt;newFromString( { string =&gt; $stringOrStringRef [, zipName =&gt; $fileName ] )</dt>
<dd>

<p>Construct a new member from the given string. Returns undef on error.</p>

<pre><code>    my $member = Archive::Zip::Member-&gt;newFromString( &#39;This is a test&#39; );
    my $member = Archive::Zip::Member-&gt;newFromString( &#39;This is a test&#39;, &#39;test.txt&#39; );
    my $member = Archive::Zip::Member-&gt;newFromString( { string =&gt; &#39;This is a test&#39;, zipName =&gt; &#39;test.txt&#39; } );</code></pre>

</dd>
<dt id="newFromFile(-$fileName-[,-$zipName-]-)"><a id="newFromFile"></a><a id="newFromFile---fileName----zipName"></a>newFromFile( $fileName [, $zipName ] )</dt>
<dd>

</dd>
<dt id="newFromFile(-{-filename-=&gt;-$fileName-[,-zipName-=&gt;-$zipName-]-}-)"><a id="newFromFile1"></a><a id="newFromFile----filename----fileName---zipName----zipName"></a>newFromFile( { filename =&gt; $fileName [, zipName =&gt; $zipName ] } )</dt>
<dd>

<p>Construct a new member from the given file. Returns undef on error.</p>

<pre><code>    my $member = Archive::Zip::Member-&gt;newFromFile( &#39;xyz.txt&#39; );</code></pre>

</dd>
<dt id="newDirectoryNamed(-$directoryName-[,-$zipname-]-)"><a id="newDirectoryNamed"></a><a id="newDirectoryNamed---directoryName----zipname"></a>newDirectoryNamed( $directoryName [, $zipname ] )</dt>
<dd>

</dd>
<dt id="newDirectoryNamed(-{-directoryName-=&gt;-$directoryName-[,-zipName-=&gt;-$zipname-]-}-)"><a id="newDirectoryNamed1"></a><a id="newDirectoryNamed----directoryName----directoryName---zipName----zipname"></a>newDirectoryNamed( { directoryName =&gt; $directoryName [, zipName =&gt; $zipname ] } )</dt>
<dd>

<p>Construct a new member from the given directory. <code>$directoryName</code> must be a valid name on your file system; it does not have to exist.</p>

<p>If given, <code>$zipname</code> will be the name of the zip member; it must be a valid Zip (Unix) name. If not given, it will be converted from <code>$directoryName</code>.</p>

<p>Returns undef on error.</p>

<pre><code>    my $member = Archive::Zip::Member-&gt;newDirectoryNamed( &#39;CVS/&#39; );</code></pre>

</dd>
</dl>

<h2 id="Member-Simple-Accessors"><a id="Member1"></a>Member Simple Accessors</h2>

<p>These methods get (and/or set) member attribute values.</p>

<p>The zip64 format requires parts of the member data to be stored in the so-called extra fields. You cannot get nor set this zip64 data through the extra field accessors described in this section. In fact, the low-level member methods ensure that the zip64 data in the extra fields is handled completely transparently and invisibly to the user when members are read or written.</p>

<dl>

<dt id="zip64()1"><a id="zip641"></a>zip64()</dt>
<dd>

<p>Returns whether the previous read or write of the member has been done in zip64 format.</p>

</dd>
<dt id="desiredZip64Mode()1"><a id="desiredZip64Mode1"></a>desiredZip64Mode()</dt>
<dd>

<p>Gets or sets whether the member&#39;s headers should be written in zip64 format: As needed (ZIP64_AS_NEEDED), the default, or always (ZIP64_HEADERS).</p>

</dd>
<dt id="versionMadeBy()1"><a id="versionMadeBy1"></a>versionMadeBy()</dt>
<dd>

<p>Gets the field from the member header.</p>

</dd>
<dt id="fileAttributeFormat(-[-$format-]-)"><a id="fileAttributeFormat"></a><a id="fileAttributeFormat-----format"></a>fileAttributeFormat( [ $format ] )</dt>
<dd>

</dd>
<dt id="fileAttributeFormat(-[-{-format-=&gt;-$format-]-}-)"><a id="fileAttributeFormat1"></a><a id="fileAttributeFormat------format----format"></a>fileAttributeFormat( [ { format =&gt; $format ] } )</dt>
<dd>

<p>Gets or sets the field from the member header. These are <code>FA_*</code> values.</p>

</dd>
<dt id="versionNeededToExtract()1"><a id="versionNeededToExtract1"></a>versionNeededToExtract()</dt>
<dd>

<p>Gets the field from the member header.</p>

</dd>
<dt id="bitFlag()"><a id="bitFlag"></a>bitFlag()</dt>
<dd>

<p>Gets the general purpose bit field from the member header. This is where the <code>GPBF_*</code> bits live.</p>

</dd>
<dt id="compressionMethod()"><a id="compressionMethod"></a>compressionMethod()</dt>
<dd>

<p>Returns the member compression method. This is the method that is currently being used to compress the member data. This will be COMPRESSION_STORED for added string or file members, or any of the <code>COMPRESSION_*</code> values for members from a zip file. However, this module can only handle members whose data is in COMPRESSION_STORED or COMPRESSION_DEFLATED format.</p>

</dd>
<dt id="desiredCompressionMethod(-[-$method-]-)"><a id="desiredCompressionMethod"></a><a id="desiredCompressionMethod-----method"></a>desiredCompressionMethod( [ $method ] )</dt>
<dd>

</dd>
<dt id="desiredCompressionMethod(-[-{-compressionMethod-=&gt;-$method-}-]-)"><a id="desiredCompressionMethod1"></a><a id="desiredCompressionMethod------compressionMethod----method"></a>desiredCompressionMethod( [ { compressionMethod =&gt; $method } ] )</dt>
<dd>

<p>Get or set the member&#39;s <code>desiredCompressionMethod</code>. This is the compression method that will be used when the member is written. Returns prior desiredCompressionMethod. Only COMPRESSION_DEFLATED or COMPRESSION_STORED are valid arguments. Changing to COMPRESSION_STORED will change the member desiredCompressionLevel to 0; changing to COMPRESSION_DEFLATED will change the member desiredCompressionLevel to COMPRESSION_LEVEL_DEFAULT.</p>

</dd>
<dt id="desiredCompressionLevel(-[-$level-]-)"><a id="desiredCompressionLevel"></a><a id="desiredCompressionLevel-----level"></a>desiredCompressionLevel( [ $level ] )</dt>
<dd>

</dd>
<dt id="desiredCompressionLevel(-[-{-compressionLevel-=&gt;-$level-}-]-)"><a id="desiredCompressionLevel1"></a><a id="desiredCompressionLevel------compressionLevel----level"></a>desiredCompressionLevel( [ { compressionLevel =&gt; $level } ] )</dt>
<dd>

<p>Get or set the member&#39;s desiredCompressionLevel This is the method that will be used to write. Returns prior desiredCompressionLevel. Valid arguments are 0 through 9, COMPRESSION_LEVEL_NONE, COMPRESSION_LEVEL_DEFAULT, COMPRESSION_LEVEL_BEST_COMPRESSION, and COMPRESSION_LEVEL_FASTEST. 0 or COMPRESSION_LEVEL_NONE will change the desiredCompressionMethod to COMPRESSION_STORED. All other arguments will change the desiredCompressionMethod to COMPRESSION_DEFLATED.</p>

</dd>
<dt id="externalFileName()"><a id="externalFileName"></a>externalFileName()</dt>
<dd>

<p>Return the member&#39;s external file name, if any, or undef.</p>

</dd>
<dt id="fileName()1"><a id="fileName1"></a>fileName()</dt>
<dd>

<p>Get or set the member&#39;s internal filename. Returns the (possibly new) filename. Names will have backslashes converted to forward slashes, and will have multiple consecutive slashes converted to single ones.</p>

</dd>
<dt id="lastModFileDateTime()"><a id="lastModFileDateTime"></a>lastModFileDateTime()</dt>
<dd>

<p>Return the member&#39;s last modification date/time stamp in MS-DOS format.</p>

</dd>
<dt id="lastModTime()"><a id="lastModTime"></a>lastModTime()</dt>
<dd>

<p>Return the member&#39;s last modification date/time stamp, converted to unix localtime format.</p>

<pre><code>    print &quot;Mod Time: &quot; . scalar( localtime( $member-&gt;lastModTime() ) );</code></pre>

</dd>
<dt id="setLastModFileDateTimeFromUnix()"><a id="setLastModFileDateTimeFromUnix"></a>setLastModFileDateTimeFromUnix()</dt>
<dd>

<p>Set the member&#39;s lastModFileDateTime from the given unix time.</p>

<pre><code>    $member-&gt;setLastModFileDateTimeFromUnix( time() );</code></pre>

</dd>
<dt id="internalFileAttributes()"><a id="internalFileAttributes"></a>internalFileAttributes()</dt>
<dd>

<p>Return the internal file attributes field from the zip header. This is only set for members read from a zip file.</p>

</dd>
<dt id="externalFileAttributes()"><a id="externalFileAttributes"></a>externalFileAttributes()</dt>
<dd>

<p>Return member attributes as read from the ZIP file. Note that these are NOT UNIX!</p>

</dd>
<dt id="unixFileAttributes(-[-$newAttributes-]-)"><a id="unixFileAttributes"></a><a id="unixFileAttributes-----newAttributes"></a>unixFileAttributes( [ $newAttributes ] )</dt>
<dd>

</dd>
<dt id="unixFileAttributes(-[-{-attributes-=&gt;-$newAttributes-}-]-)"><a id="unixFileAttributes1"></a><a id="unixFileAttributes------attributes----newAttributes"></a>unixFileAttributes( [ { attributes =&gt; $newAttributes } ] )</dt>
<dd>

<p>Get or set the member&#39;s file attributes using UNIX file attributes. Returns old attributes.</p>

<pre><code>    my $oldAttribs = $member-&gt;unixFileAttributes( 0666 );</code></pre>

<p>Note that the return value has more than just the file permissions, so you will have to mask off the lowest bits for comparisons.</p>

</dd>
<dt id="localExtraField(-[-$newField-]-)"><a id="localExtraField"></a><a id="localExtraField-----newField"></a>localExtraField( [ $newField ] )</dt>
<dd>

</dd>
<dt id="localExtraField(-[-{-field-=&gt;-$newField-}-]-)"><a id="localExtraField1"></a><a id="localExtraField------field----newField"></a>localExtraField( [ { field =&gt; $newField } ] )</dt>
<dd>

<p>Gets or sets the extra field that was read from the local header. The extra field must be in the proper format. If it is not or if the new field contains data related to the zip64 format, this method does not modify the extra field and returns AZ_FORMAT_ERROR, otherwise it returns AZ_OK.</p>

</dd>
<dt id="cdExtraField(-[-$newField-]-)"><a id="cdExtraField"></a><a id="cdExtraField-----newField"></a>cdExtraField( [ $newField ] )</dt>
<dd>

</dd>
<dt id="cdExtraField(-[-{-field-=&gt;-$newField-}-]-)"><a id="cdExtraField1"></a><a id="cdExtraField------field----newField"></a>cdExtraField( [ { field =&gt; $newField } ] )</dt>
<dd>

<p>Gets or sets the extra field that was read from the central directory header. The extra field must be in the proper format. If it is not or if the new field contains data related to the zip64 format, this method does not modify the extra field and returns AZ_FORMAT_ERROR, otherwise it returns AZ_OK.</p>

</dd>
<dt id="extraFields()"><a id="extraFields"></a>extraFields()</dt>
<dd>

<p>Return both local and CD extra fields, concatenated.</p>

</dd>
<dt id="fileComment(-[-$newComment-]-)"><a id="fileComment"></a><a id="fileComment-----newComment"></a>fileComment( [ $newComment ] )</dt>
<dd>

</dd>
<dt id="fileComment(-[-{-comment-=&gt;-$newComment-}-]-)"><a id="fileComment1"></a><a id="fileComment------comment----newComment"></a>fileComment( [ { comment =&gt; $newComment } ] )</dt>
<dd>

<p>Get or set the member&#39;s file comment.</p>

</dd>
<dt id="hasDataDescriptor()"><a id="hasDataDescriptor"></a>hasDataDescriptor()</dt>
<dd>

<p>Get or set the data descriptor flag. If this is set, the local header will not necessarily have the correct data sizes. Instead, a small structure will be stored at the end of the member data with these values. This should be transparent in normal operation.</p>

</dd>
<dt id="crc32()"><a id="crc32"></a>crc32()</dt>
<dd>

<p>Return the CRC-32 value for this member. This will not be set for members that were constructed from strings or external files until after the member has been written.</p>

</dd>
<dt id="crc32String()"><a id="crc32String"></a>crc32String()</dt>
<dd>

<p>Return the CRC-32 value for this member as an 8 character printable hex string. This will not be set for members that were constructed from strings or external files until after the member has been written.</p>

</dd>
<dt id="compressedSize()"><a id="compressedSize"></a>compressedSize()</dt>
<dd>

<p>Return the compressed size for this member. This will not be set for members that were constructed from strings or external files until after the member has been written.</p>

</dd>
<dt id="uncompressedSize()"><a id="uncompressedSize"></a>uncompressedSize()</dt>
<dd>

<p>Return the uncompressed size for this member.</p>

</dd>
<dt id="password(-[-$password-]-)"><a id="password"></a><a id="password-----password"></a>password( [ $password ] )</dt>
<dd>

<p>Returns the password for this member to be used on decryption. If $password is given, it will set the password for the decryption.</p>

</dd>
<dt id="isEncrypted()"><a id="isEncrypted"></a>isEncrypted()</dt>
<dd>

<p>Return true if this member is encrypted. The Archive::Zip module does not currently support creation of encrypted members. Decryption works more or less like this:</p>

<pre><code>  my $zip = Archive::Zip-&gt;new;
  $zip-&gt;read (&quot;encrypted.zip&quot;);
  for my $m (map { $zip-&gt;memberNamed ($_) } $zip-&gt;memberNames) {
      $m-&gt;password (&quot;secret&quot;);
      $m-&gt;contents;  # is &quot;&quot; when password was wrong</code></pre>

<p>That shows that the password has to be set per member, and not per archive. This might change in the future.</p>

</dd>
<dt id="isTextFile(-[-$flag-]-)"><a id="isTextFile"></a><a id="isTextFile-----flag"></a>isTextFile( [ $flag ] )</dt>
<dd>

</dd>
<dt id="isTextFile(-[-{-flag-=&gt;-$flag-}-]-)"><a id="isTextFile1"></a><a id="isTextFile------flag----flag"></a>isTextFile( [ { flag =&gt; $flag } ] )</dt>
<dd>

<p>Returns true if I am a text file. Also can set the status if given an argument (then returns old state). Note that this module does not currently do anything with this flag upon extraction or storage. That is, bytes are stored in native format whether or not they came from a text file.</p>

</dd>
<dt id="isBinaryFile()"><a id="isBinaryFile"></a>isBinaryFile()</dt>
<dd>

<p>Returns true if I am a binary file. Also can set the status if given an argument (then returns old state). Note that this module does not currently do anything with this flag upon extraction or storage. That is, bytes are stored in native format whether or not they came from a text file.</p>

</dd>
<dt id="extractToFileNamed(-$fileName-)"><a id="extractToFileNamed"></a><a id="extractToFileNamed---fileName"></a>extractToFileNamed( $fileName )</dt>
<dd>

</dd>
<dt id="extractToFileNamed(-{-name-=&gt;-$fileName-}-)"><a id="extractToFileNamed1"></a><a id="extractToFileNamed----name----fileName"></a>extractToFileNamed( { name =&gt; $fileName } )</dt>
<dd>

<p>Extract me to a file with the given name. The file will be created with default modes. Directories will be created as needed. The <code>$fileName</code> argument should be a valid file name on your file system. Returns AZ_OK on success.</p>

</dd>
<dt id="isDirectory()"><a id="isDirectory"></a>isDirectory()</dt>
<dd>

<p>Returns true if I am a directory.</p>

</dd>
<dt id="isSymbolicLink()"><a id="isSymbolicLink"></a>isSymbolicLink()</dt>
<dd>

<p>Returns true if I am a symbolic link.</p>

</dd>
<dt id="writeLocalHeaderRelativeOffset()"><a id="writeLocalHeaderRelativeOffset"></a>writeLocalHeaderRelativeOffset()</dt>
<dd>

<p>Returns the file offset in bytes the last time I was written.</p>

</dd>
<dt id="wasWritten()"><a id="wasWritten"></a>wasWritten()</dt>
<dd>

<p>Returns true if I was successfully written. Reset at the beginning of a write attempt.</p>

</dd>
</dl>

<h2 id="Low-level-member-data-reading"><a id="Low"></a>Low-level member data reading</h2>

<p>It is possible to use lower-level routines to access member data streams, rather than the extract* methods and contents(). For instance, here is how to print the uncompressed contents of a member in chunks using these methods:</p>

<pre><code>    my ( $member, $status, $bufferRef );
    $member = $zip-&gt;memberNamed( &#39;xyz.txt&#39; );
    $member-&gt;desiredCompressionMethod( COMPRESSION_STORED );
    $status = $member-&gt;rewindData();
    die &quot;error $status&quot; unless $status == AZ_OK;
    while ( ! $member-&gt;readIsDone() )
    {
    ( $bufferRef, $status ) = $member-&gt;readChunk();
    die &quot;error $status&quot;
                if $status != AZ_OK &amp;&amp; $status != AZ_STREAM_END;
    # do something with $bufferRef:
    print $$bufferRef;
    }
    $member-&gt;endRead();</code></pre>

<dl>

<dt id="readChunk(-[-$chunkSize-]-)"><a id="readChunk"></a><a id="readChunk-----chunkSize"></a>readChunk( [ $chunkSize ] )</dt>
<dd>

</dd>
<dt id="readChunk(-[-{-chunkSize-=&gt;-$chunkSize-}-]-)"><a id="readChunk1"></a><a id="readChunk------chunkSize----chunkSize"></a>readChunk( [ { chunkSize =&gt; $chunkSize } ] )</dt>
<dd>

<p>This reads the next chunk of given size from the member&#39;s data stream and compresses or uncompresses it as necessary, returning a reference to the bytes read and a status. If size argument is not given, defaults to global set by Archive::Zip::setChunkSize. Status is AZ_OK on success until the last chunk, where it returns AZ_STREAM_END. Returns <code>( \$bytes, $status)</code>.</p>

<pre><code>    my ( $outRef, $status ) = $self-&gt;readChunk();
    print $$outRef if $status != AZ_OK &amp;&amp; $status != AZ_STREAM_END;</code></pre>

</dd>
<dt id="rewindData()"><a id="rewindData"></a>rewindData()</dt>
<dd>

<p>Rewind data and set up for reading data streams or writing zip files. Can take options for <code>inflateInit()</code> or <code>deflateInit()</code>, but this is not likely to be necessary. Subclass overrides should call this method. Returns <code>AZ_OK</code> on success.</p>

</dd>
<dt id="endRead()"><a id="endRead"></a>endRead()</dt>
<dd>

<p>Reset the read variables and free the inflater or deflater. Must be called to close files, etc. Returns AZ_OK on success.</p>

</dd>
<dt id="readIsDone()"><a id="readIsDone"></a>readIsDone()</dt>
<dd>

<p>Return true if the read has run out of data or encountered an error.</p>

</dd>
<dt id="contents()"><a id="contents2"></a>contents()</dt>
<dd>

<p>Return the entire uncompressed member data or undef in scalar context. When called in array context, returns <code>( $string, $status )</code>; status will be AZ_OK on success:</p>

<pre><code>    my $string = $member-&gt;contents();
    # or
    my ( $string, $status ) = $member-&gt;contents();
    die &quot;error $status&quot; unless $status == AZ_OK;</code></pre>

<p>Can also be used to set the contents of a member (this may change the class of the member):</p>

<pre><code>    $member-&gt;contents( &quot;this is my new contents&quot; );</code></pre>

</dd>
<dt id="extractToFileHandle(-$fh-)"><a id="extractToFileHandle"></a><a id="extractToFileHandle---fh"></a>extractToFileHandle( $fh )</dt>
<dd>

</dd>
<dt id="extractToFileHandle(-{-fileHandle-=&gt;-$fh-}-)"><a id="extractToFileHandle1"></a><a id="extractToFileHandle----fileHandle----fh"></a>extractToFileHandle( { fileHandle =&gt; $fh } )</dt>
<dd>

<p>Extract (and uncompress, if necessary) the member&#39;s contents to the given file handle. Return AZ_OK on success.</p>

<p>For members representing symbolic links, pass the name of the symbolic link as file handle. Ensure that all directories in the path to the symbolic link already exist.</p>

</dd>
</dl>

<h1 id="Archive::Zip::FileMember-methods"><a id="Archive14"></a>Archive::Zip::FileMember methods</h1>

<p>The Archive::Zip::FileMember class extends Archive::Zip::Member. It is the base class for both ZipFileMember and NewFileMember classes. This class adds an <code>externalFileName</code> and an <code>fh</code> member to keep track of the external file.</p>

<dl>

<dt id="externalFileName()1"><a id="externalFileName1"></a>externalFileName()</dt>
<dd>

<p>Return the member&#39;s external filename.</p>

</dd>
<dt id="fh()"><a id="fh"></a>fh()</dt>
<dd>

<p>Return the member&#39;s read file handle. Automatically opens file if necessary.</p>

</dd>
</dl>

<h1 id="Archive::Zip::ZipFileMember-methods"><a id="Archive15"></a>Archive::Zip::ZipFileMember methods</h1>

<p>The Archive::Zip::ZipFileMember class represents members that have been read from external zip files.</p>

<dl>

<dt id="diskNumberStart()"><a id="diskNumberStart"></a>diskNumberStart()</dt>
<dd>

<p>Returns the disk number that the member&#39;s local header resides in. Should be 0.</p>

</dd>
<dt id="localHeaderRelativeOffset()"><a id="localHeaderRelativeOffset"></a>localHeaderRelativeOffset()</dt>
<dd>

<p>Returns the offset into the zip file where the member&#39;s local header is.</p>

</dd>
<dt id="dataOffset()"><a id="dataOffset"></a>dataOffset()</dt>
<dd>

<p>Returns the offset from the beginning of the zip file to the member&#39;s data.</p>

</dd>
</dl>

<h1 id="REQUIRED-MODULES"><a id="REQUIRED"></a>REQUIRED MODULES</h1>

<p><a href="./Archive::Zip.html">Archive::Zip</a> requires several other modules:</p>

<p><a href="https://metacpan.org/pod/Carp">Carp</a></p>

<p><a href="https://metacpan.org/pod/Compress::Raw::Zlib">Compress::Raw::Zlib</a></p>

<p><a href="https://metacpan.org/pod/Cwd">Cwd</a></p>

<p><a href="https://metacpan.org/pod/File::Basename">File::Basename</a></p>

<p><a href="https://metacpan.org/pod/File::Copy">File::Copy</a></p>

<p><a href="https://metacpan.org/pod/File::Find">File::Find</a></p>

<p><a href="https://metacpan.org/pod/File::Path">File::Path</a></p>

<p><a href="https://metacpan.org/pod/File::Spec">File::Spec</a></p>

<p><a href="https://metacpan.org/pod/IO::File">IO::File</a></p>

<p><a href="https://metacpan.org/pod/IO::Seekable">IO::Seekable</a></p>

<p><a href="https://metacpan.org/pod/Time::Local">Time::Local</a></p>

<h1 id="BUGS-AND-CAVEATS"><a id="BUGS"></a>BUGS AND CAVEATS</h1>

<h2 id="When-not-to-use-Archive::Zip"><a id="When"></a>When not to use Archive::Zip</h2>

<p>If you are just going to be extracting zips (and/or other archives) you are recommended to look at using <a href="./Archive::Extract.html">Archive::Extract</a> instead, as it is much easier to use and factors out archive-specific functionality.</p>

<h2 id="Zip64-Format-Support"><a id="Zip64"></a>Zip64 Format Support</h2>

<p>Since version 1.66 Archive::Zip supports the so-called zip64 format, which overcomes various limitations in the original zip file format. On some Perl interpreters, however, even version 1.66 and newer of Archive::Zip cannot support the zip64 format. Among these are all Perl interpreters that lack 64-bit support and those older than version 5.10.0.</p>

<p>Constant <code>ZIP64_SUPPORTED</code>, exported with tag <a href="https://metacpan.org/pod/:CONSTANTS">:CONSTANTS</a>, equals true if Archive::Zip on the current Perl interpreter supports the zip64 format. If it does not and you try to read or write an archive in zip64 format, anyway, Archive::Zip returns an error <code>AZ_ERROR</code> and reports an error message along the lines of &quot;zip64 format not supported on this Perl interpreter&quot;.</p>

<h2 id="versionMadeBy-and-versionNeededToExtract"><a id="versionMadeBy2"></a><code>versionMadeBy</code> and <code>versionNeededToExtract</code></h2>

<p>The zip64 format and the zip file format in general specify what values to use for the <code>versionMadeBy</code> and <code>versionNeededToExtract</code> fields in the local file header, central directory file header, and zip64 EOCD record. In practice however, these fields seem to be more or less randomly used by various archiver implementations.</p>

<p>To achieve a compromise between backward compatibility and (whatever) standard compliance, Archive::Zip handles them as follows:</p>

<ul>

<li><p>For field <code>versionMadeBy</code>, Archive::Zip uses default value 20 (45 for the zip64 EOCD record) or any previously read value. It never changes that value when writing a header, even if it is written in zip64 format, or when writing the zip64 EOCD record.</p>

</li>
<li><p>Likewise for field <code>versionNeededToExtract</code>, but here Archive::Zip forces a minimum value of 45 when writing a header in zip64 format or the zip64 EOCD record.</p>

</li>
<li><p>Finally, Archive::Zip never depends on the values of these fields in any way when reading an archive from a file or file handle.</p>

</li>
</ul>

<h2 id="Try-to-avoid-IO::Scalar"><a id="Try"></a>Try to avoid IO::Scalar</h2>

<p>One of the most common ways to use Archive::Zip is to generate Zip files in-memory. Most people use <a href="./IO::Scalar.html">IO::Scalar</a> for this purpose.</p>

<p>Unfortunately, as of 1.11 this module no longer works with <a href="./IO::Scalar.html">IO::Scalar</a> as it incorrectly implements seeking.</p>

<p>Anybody using <a href="./IO::Scalar.html">IO::Scalar</a> should consider porting to <a href="./IO::String.html">IO::String</a>, which is smaller, lighter, and is implemented to be perfectly compatible with regular seekable filehandles.</p>

<p>Support for <a href="./IO::Scalar.html">IO::Scalar</a> most likely will <b>not</b> be restored in the future, as <a href="./IO::Scalar.html">IO::Scalar</a> itself cannot change the way it is implemented due to back-compatibility issues.</p>

<h2 id="Wrong-password-for-encrypted-members"><a id="Wrong"></a>Wrong password for encrypted members</h2>

<p>When an encrypted member is read using the wrong password, you currently have to re-read the entire archive to try again with the correct password.</p>

<h1 id="TO-DO"><a id="TO"></a>TO DO</h1>

<p>* auto-choosing storing vs compression</p>

<p>* extra field hooks (see notes.txt)</p>

<p>* check for duplicates on addition/renaming?</p>

<p>* Text file extraction (line end translation)</p>

<p>* Reading zip files from non-seekable inputs (Perhaps by proxying through IO::String?)</p>

<p>* separate unused constants into separate module</p>

<p>* cookbook style docs</p>

<p>* Handle tainted paths correctly</p>

<p>* Work on better compatibility with other IO:: modules</p>

<p>* Support encryption</p>

<p>* More user-friendly decryption</p>

<h1 id="SUPPORT">SUPPORT</h1>

<p>Bugs should be reported on GitHub</p>

<p><a href="https://github.com/redhotpenguin/perl-Archive-Zip/issues">https://github.com/redhotpenguin/perl-Archive-Zip/issues</a></p>

<p>For other issues contact the maintainer.</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p>Currently maintained by Fred Moyer &lt;fred@redhotpenguin.com&gt;</p>

<p>Previously maintained by Adam Kennedy &lt;adamk@cpan.org&gt;</p>

<p>Previously maintained by Steve Peters &lt;steve@fisharerojo.org&gt;.</p>

<p>File attributes code by Maurice Aubrey &lt;maurice@lovelyfilth.com&gt;.</p>

<p>Originally by Ned Konz &lt;nedkonz@cpan.org&gt;.</p>

<h1 id="COPYRIGHT">COPYRIGHT</h1>

<p>Some parts copyright 2006 - 2012 Adam Kennedy.</p>

<p>Some parts copyright 2005 Steve Peters.</p>

<p>Original work copyright 2000 - 2004 Ned Konz.</p>

<p>This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</p>

<h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1>

<p>Look at <a href="https://metacpan.org/pod/Archive::Zip::MemberRead">Archive::Zip::MemberRead</a> which is a wrapper that allows one to read Zip archive members as if they were files.</p>

<p><a href="https://metacpan.org/pod/Compress::Raw::Zlib">Compress::Raw::Zlib</a>, <a href="https://metacpan.org/pod/Archive::Tar">Archive::Tar</a>, <a href="./Archive::Extract.html">Archive::Extract</a></p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Archive::Zip, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Archive::Zip</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Archive::Zip</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Archive::Zip.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
